In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "mahout installation and simple testing methods", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "mahout installation and simple testing methods" bar!
1 installation environment
System / software expressly known as version download address remarks
Hadoop
0.20.2 http://mirror.esocc.com/apache/hadoop/common/
Mahout
0.4 http://mirrors.cnnic.cn/apache/mahout/0.4/
Operating system debain
6.02
List of hadoop nodes
System clear\ name
Hadoop node
Ip address
Remarks
Debain7
Namenode
192.168.1.111
Datanode1
Datanode192.168.1.112
Datanode2
Datanode
192.168.1.113
Datanode3
Datanode
192.168.1.114
2 installation steps
2.1 decompress mahout-distribution-0.4.tar.gz
Tar-axvf mahout-distribution-0.4.tar.gz
2.2 rename the file to mahout
Mv mahout-distribution-0.4 mahout
2.3 modify the ~ / .bashrc file to add the following lines of data
Export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-amd64
Export HADOOP_HOME=/usr/local/hadoop
Export HADOOP_CONF_DIR=/usr/local/hadoop/conf
Export MAHOUT_HOME=/usr/local/mahout
Export MAHOUT_CONF_DIR=/usr/local/mahout/conf
Export PATH=$PATH:$HADOOP_HOME_DIR:$HADOOP_HOME/bin:$MAHOUT_HOME/conf:$MAHOUT_HOME/bin
2.4 restart the server, or the information set above will not work
2.5 start hadoop and test whether mahout is installed successfully
Mahout
Download mahout test data
Wget http://archive.ics.uci.edu/ml/databases/synthetic_control/synthetic_control.data
2.7 hadoop create a test directory
2.8 upload test data
2.9 start the kmeans algorithm and start testing
Mahout org.apache.mahout.clustering.syntheticcontrol.kmeans.Job
2.10 View results
3 problems
Tianbx@localhost: / usr/local/mahout/bin$. / mahout-- help
MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
Exception in thread "main" java.lang.NoClassDefFoundError: classpath
Caused by: java.lang.ClassNotFoundException: classpath
At java.net.URLClassLoader$1.run (URLClassLoader.java:217)
At java.security.AccessController.doPrivileged (Native Method)
At java.net.URLClassLoader.findClass (URLClassLoader.java:205)
At java.lang.ClassLoader.loadClass (ClassLoader.java:321)
At sun.misc.Launcher$AppClassLoader.loadClass (Launcher.java:294)
At java.lang.ClassLoader.loadClass (ClassLoader.java:266)
Could not find the main class: classpath. Program will exit.
Running on hadoop, using / usr/local/hadoop/bin/hadoop and HADOOP_CONF_DIR=/usr/local/hadoop/conf
Reason: at first I installed mahout0.8, while hadoop is 0.2. compatibility between versions.
Solution: instead of installing mahout0.8, just switch to mahout0.4.
Thank you for your reading, the above is the content of "mahout installation and simple testing methods", after the study of this article, I believe you have a deeper understanding of mahout installation and simple testing methods, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.