代码语言:javascript复制
mkdir input
cd intput
echo “hello word” > file1.txt
echo “hello hadoop” > file2.txt
echo “hello mapreduce” >> file2.txt
more file2.txt
hdfs dfs -mkdir /wc_input
hdfs dfs -ls /
hdfs dfs -put ~/input/fi* /wc_input
hdfs dfs -ls /wc_input
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.3.jar wordcount /wc_input /output
hdfs dfs -ls /output
hdfs dfs -cat /output/part-r-00000