我有一個HDFS結構類似使用FileInputFormat.addInputPaths遞歸添加HDFS路徑
a/b/file1.gz
a/b/file2.gz
a/c/file3.gz
a/c/file4.gz
我使用的
FileInputFormat.addInputPaths(conf, args[0]);
經典模式設置爲我輸入路徑java map減少工作。
如果我指定能正常工作ARGS [0]作爲A/B但如果我只指定一個(我的意圖是處理所有4個文件)
錯誤是
失敗Exception in thread "main" java.io.IOException: Not a file: hdfs://host:9000/user/hadoop/a
如何遞歸添加下的所有內容a?
我必須失去了一些東西簡單...
conf.setBoolean( 「mapreduce.input.fileinputformat.input.dir.recursive」,真正的);也在Hadoop 2.2.0中爲我工作 – Alex