Concurrent write issues in HDFS

Concurrent write problem of hdfs

Concurrent write problem of hdfs

As we all know, one of the disadvantages of the hdfs component of hadoop is that it does not support concurrent writing, and does not support immediate modification of files.

There are two situations:
two clients upload files with different names to hdfs at the same time :
Insert picture description here
Insert picture description here
all upload successfully.
Two clients upload files with the same name to hdfs at the same time :
Insert picture description here
Insert picture description here
Both files failed to upload.
Therefore, the inability of hdfs to write concurrently means that files with the same location and the same name cannot be uploaded at the same time.

In another case,
two files with the same name, one file is successfully uploaded, and another client is used to upload the file with the same name, it will prompt File exists.
Insert picture description here

in conclusion

The inability of hdfs to write concurrently refers to:There can only be one writer for a file with the same name in the same location, otherwise all upload requests will fail

Files with different locations or different names can be uploaded at the same time.

Guess you like

Origin blog.csdn.net/qq_32727095/article/details/113737955