2014-01-18 47 views

回答

1
try { 
    FileSystem hdfs = FileSystem.get(conf); 
    FileUtil.copyMerge(hdfs, new Path(srcPath), hdfs, new Path(
          dstPath), false, conf, null); 
} catch (IOException e) { 
     e.printStackTrace(); 
} 

srcPath - 個別文件的目錄。

相關問題