Is there a way to append data to a hdfs file using Pydoop?
<p>I am trying to write contents of an object to a file in hdfs using python. For this, I have found a hdfs API implemented in python named Pydoop. Reading the API, I can easily use <code>dump()</code> method of pydoop to write contents to a file in hdfs path but have not seen any method like <code>append()</code> that could append new content to the old file. I know it is possible as I have found command line syntax for hdfs that does this but was thinking of using pydoop for doing this. Any help will be appreciated. Thanks</p>

<p>Haven't used Pydoop, but this reads just like the Python API for appending to a regular file. </p>

<pre><code>from pydoop import hdfs

with hdfs.open('/path/to/file', 'a') as f:
    f.write('bla')
</code></pre>

python hadoop hdfs