hadoop任务测试
时间:2014-11-04 18:43 来源:linux.it.net.cn 作者:it
cd
echo “Hello World Bye World” > file01
echo “Hello Hadoop Goodbye Hadoop” > file02
(2)在hdfs 中建立一个input 目录:
cd hadoop/hadoop1.0.0/bin/
./hadoop dfs –mkdir input
(3)将file01 和file02 拷贝到hdfs 中:
./hadoop dfs –put ~/file0* input
(4)执行wordcount:
./hadoop jar hadoop-examples-1.0.2.jar wordcount input output
(5)完成之后,查看结果:
./hadoop dfs -cat output/*
(责任编辑:IT)
cd echo “Hello World Bye World” > file01 echo “Hello Hadoop Goodbye Hadoop” > file02 (2)在hdfs 中建立一个input 目录: cd hadoop/hadoop1.0.0/bin/ ./hadoop dfs –mkdir input (3)将file01 和file02 拷贝到hdfs 中: ./hadoop dfs –put ~/file0* input (4)执行wordcount: ./hadoop jar hadoop-examples-1.0.2.jar wordcount input output (5)完成之后,查看结果: ./hadoop dfs -cat output/* (责任编辑:IT) |