HDFS Command Line Append HDFS Command Line Append hadoop hadoop

HDFS Command Line Append


This feature is implemented in Hadoop 2.3.0 as appendToFile with a syntax like:

hdfs dfs -appendToFile localfile /user/hadoop/hadoopfile

(it was first suggested in 2009 when the HDFS Append feature was being contemplated: https://issues.apache.org/jira/browse/HADOOP-6239 )


cli doesn't support append, but httpfs and fuse both has support for appending files.

w301% ls -lAtotal 0-rw-r--r-- 1 hdfs supergroup 0 Nov 14 01:02 test.mew301% cat test.mew301% syncw301% cat test.mehellow301% echo "more rows" >> test.mew301% syncw301% cat test.me hellomore rows

EDIT: but keep in mind, that only one client can append to file.