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