。我使用-archives从本地机器上传tgz到hdfs任务工作目录,但是它并没有像文档所说的那样被解雇。我搜索了很多,没有任何运气。当编写hadoop streaming任务时,hadoop streaming不解压档案文件
这里是Hadoop的2.5.2 Hadoop的数据流任务开始的命令,很简单
hadoop jar /opt/hadoop/share/hadoop/tools/lib/hadoop-streaming-2.5.2.jar \
-files mapper.sh
-archives /home/hadoop/tmp/test.tgz#test \
-D mapreduce.job.maps=1 \
-D mapreduce.job.reduces=1 \
-input "/test/test.txt" \
-output "/res/" \
-mapper "sh mapper.sh" \
-reducer "cat"
和 “mapper.sh”
cat > /dev/null
ls -l test
exit 0
在 “test.tgz”
在两个文件 “test.1.txt” 和 “test.2.txt”
echo "abcd" > test.1.txt
echo "efgh" > test.2.txt
tar zcvf test.tgz test.1.txt test.2.txt
从上述任务
输出lrwxrwxrwx 1 hadoop hadoop 71 Feb 8 23:25 test -> /tmp/hadoop-hadoop/nm-local-dir/usercache/hadoop/filecache/116/test.tgz
但什么希望的可能是这样
-rw-r--r-- 1 hadoop hadoop 5 Feb 8 23:25 test.1.txt
-rw-r--r-- 1 hadoop hadoop 5 Feb 8 23:25 test.2.txt
那么,为什么test.tgz一直没有自动未解压的document说,是有任何其他方式使得“TGZ”是未解压
任何帮助,请,谢谢
任何帮助,请 – Tios 2015-02-10 03:46:04