hadoop2.6 installation and execution wordcount under "Hadoop" Mac

Source: Internet
Author: User

First, a brief introduction of the next blogger's configuration environment

    • MAC 10.10.0
    • Hadoop 2.6
    • JDK 1.6 (can be queried in the shell using jdk-version)
Hadoop installation

It is recommended to use the brew under the MAC for installation, the reason is to use brew installation, it will automatically help you configure the appropriate path. Of course, you can download it on the official website and note that the JDK and Hadoop versions correspond.

install hadoop

Once installed, you can use the Brew list Hadoop to view it.
The location should be in:/usr/local/cellar/hadoop/
It is not convenient to execute Hadoop commands directly in the shell at this time.

Executive WordCount

First of all, the wordcount to be executed now is just a simple test of whether Hadoop can work, not multithreaded pseudo-distributed, because there is no configuration, this next section will say.

1. First we set up the following data sources
under the Hadoop root directory, create a folder called "Input"
put the TXT data in it, and I'll just copy the "Readme.txt" into it.
2. Now we can execute Hadoop's own commands.
The
first thing to do is to find the path to the hadoop-mapreduce-examples-2.6.0.jar file, since the examples are all in this.
execute with the Jar command because it is written in Java.

3. Execution of commands

hadoop jar /usr/local/Cellar/hadoop/2.6.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar wordcount input output
4. Effects
you'll find the shell popping a bunch of things.
it will eventually generate an output folder with something open and that is WordCount

This article comes from the blog "Bo Li Garvin"
Reprint please indicate source: Http://blog.csdn.net/buptgshengod

hadoop2.6 installation and execution wordcount under "Hadoop" Mac

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.