CDH Run wordcount example in Quick Start VM

Source: Internet
Author: User

Things to keep in mind:

1. For wordcount1.0, follow http://www.cloudera.com/content/cloudera/en/documentation/HadoopTutorial/CDH4/ Hadoop-tutorial/ht_usage.html#topic_5_2 execution.

2.hadoop Fs-mkdir/user/cloudera This statement means creating a new folder under the Hadoop file system. Executing "Cd/user/cloudera" in the terminal is incorrect and a file prompt cannot be found. My understanding is that the Hadoop file system creates a folder for each component, where user is the home directory and the following is the individual component folder. As shown in the code below, the cloudera,hdfs,hive has its own corresponding folder.

[[email protected] ~]$ Hadoop fs-ls/user/clouderafound1itemsdrwxr-xr-x-Cloudera Cloudera0 2015-01-11 05:16/user/cloudera/wordcount[[email protected] ~]$ Hadoop fs-ls/user/hdfsfound1itemsdrwxr-xr-x-HDFs supergroup0 2015-01-10 23:45/user/hdfs/. Trash[[email protected] ~]$ Hadoop fs-ls/user/hivefound1itemsdrwxrwxrwx-hive Hive0 2015-01-11 03:46/user/hive/warehouse[[email protected] ~]$

3. In the third part of the time "compile Wordcount.java", the first to copy the source code down, under "/home/cloudera/" to create a new file Wordcount.java, pay attention to case-sensitive. Then execute:

mkdir wordcount_classesjavac-classpath/usr/lib/hadoop/hadoop-common-2.5.0-cdh5.2.0.jar:/usr/lib/hadoop /client/hadoop-mapreduce-client-core-2.5.0-cdh5.2.0.jar-d wordcount_classes Wordcount.java

Note that the above code is replaced by your own version to suit your own.

4. After completing the above steps, fully follow the official website (http://www.cloudera.com/content/cloudera/en/documentation/HadoopTutorial/CDH4/Hadoop-Tutorial/ Ht_usage.html#topic_5_2).

Chuanting.zhang @ 2015-01-11 Quote Please specify the source http://www.cnblogs.com/chuantingSDU/.

CDH Run wordcount example in Quick Start VM

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.