Hadoop支持文件追加"append"

首先需要配置hdfs-site.xml文件:
     <property>
        <name>dfs.support.append</name>
        <value>true</value>

     </property>

默认dfs.support.append参数是false的

 
然后在mapreduce程序中可以如下实现文件的追加
FileSystem fs = FileSystem.get(URI.create(dst), conf);
FSDataOutputStream out = fs.append(new Path(dst));
 

具体支持文件追加的Hadoop版本信息如下:

Hadoop支持文件追加"append"_第1张图片

你可能感兴趣的:(Hadoop支持文件追加"append")