。我使用-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