Mahout Installation and configuration __mahout installation and configuration under Hadoop platform

Source: Internet
Author: User
Tags hadoop fs

First, download the binary file click on the Open link


Second, extract the file

    TAR-ZXVF mahout-distribution-0.9.tar.gz-c/usr
Third, configure environment variables: in/etc/profile, add mahout_home environment variables

Export mahout_home=/usr/apache-mahout-distribution-0.12.2

Export path= $PATH: $HADOOP _home/bin: $MAHOUT _home/bin

Export classpath=.: $JAVA _home/lib: $MAHOUT _home/lib: $JRE _home/lib: $CLASSPATH

Note: Be sure to execute the command-source/etc/profile after modifying the environment variable

Four, start Hadoop

start-all.sh

V. View the mahout version

Mahout--help

Vi. Use of Mahout

A. Download a file Synthetic_control.data, download the address Http://archive.ics.uci.edu/ml/databases/synthetic_control/synthetic_ Control.data, and put this file in the $mahout_home directory.

B. Start HADOOP: $HADOOP _home/bin/start-all.sh

C. Create test directory input and import data into this input directory

root@master# Hadoop Fs-mkdir Input 
root@master:~/$ Hadoop fs-put/home/zc/desktop/synthetic_control.data Input

D. Use the Kmeans algorithm (which will run for a few minutes)

root@master~/$ Hadoop Jar/usr/apache-mahout-distribution-0.12.2/mahout-examples-0.12.2.jar Org.apache.mahout.clustering.syntheticcontrol.kmeans.Job

E. Viewing results

Hadoop fs-cat/output/data/part-m-00000

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.