Support Questions

Find answers, ask questions, and share your expertise

Can hdfs appendToFile from different node to same file at the same time ?

avatar
Explorer

Hi,

May i know hdfs able to append to file using appendToFile from different node to same file at the same time using HDFS latest version ?

Thanks for any guide / advice.

Best Regards,

Jason

1 ACCEPTED SOLUTION

avatar

@Jason Hue

HDFS only allows one write or append to a file at a time. Allowing concurrent writes would mean that the order of bytes in the file would be random. Even if the two appends write to different blocks, how would you determine which block comes first in the file? It's a difficult problem to solve that has not been done in HDFS.

View solution in original post

1 REPLY 1

avatar

@Jason Hue

HDFS only allows one write or append to a file at a time. Allowing concurrent writes would mean that the order of bytes in the file would be random. Even if the two appends write to different blocks, how would you determine which block comes first in the file? It's a difficult problem to solve that has not been done in HDFS.