Failed to append to HDFS
Finally got rid of the error. Apparently it is mandatory to close the FSDataOutputStream
that is returned when you call create
from filesystem
.
That being said, this is how the method createFileInCluster
from HDFSFileUtilImpl is implemented now:
@Override public void createFileInCluster(String uriOfFile) throws IOException { Validate.notEmpty(uriOfFile); FSDataOutputStream out = fileSystem.create(new Path(uriOfFile)); out.close(); }