您的位置:首页 > 运维架构

Hadoop 文件追加(断点继传)

2015-10-14 20:49 183 查看
先配置hdfs-site.xml,如下:

     <property>

        <name>dfs.support.append</name>

        <value>true</value>

     </property>

dfs.support.append默认是关闭的。

然后程序打开文件时用:

FileSystem fs = FileSystem.get(URI.create(dst), conf);

FSDataOutputStream out = fs.append(new Path(dst));
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hadoop