PrepAway - Latest Free Exam Questions & Answers

what would another user see when trying to access this life?

You use the hadoop fs –put command to write a 300 MB file using and HDFS block size of 64 MB.
Just after this command has finished writing 200 MB of this file, what would another user see
when trying to access this life?

PrepAway - Latest Free Exam Questions & Answers

A.
They would see Hadoop throw an ConcurrentFileAccessException when they try to access this
file.

B.
They would see the current state of the file, up to the last bit written by the command.

C.
They would see the current of the file through the last completed block.

D.
They would see no content until the whole file written and closed.

Explanation:
Note:
* put
Usage: hadoop fs -put <localsrc> … <dst>
Copy single src, or multiple srcs from local file system to the destination filesystem. Also reads
input from stdin and writes to destination filesystem.

8 Comments on “what would another user see when trying to access this life?

  1. Ken says:

    Should be answer C.

    Source:
    – HDFS permits a client to read a file that is open for writing. When reading a file open for writing, the length of the last block still being written is unknown to the NameNode. The last incomplete block is not visible and neither are any subsequent blocks which are going to be completed. Only the blocks which were completed before opening the stream for reading are available. In other words if the block being written is not finished yet the reader can’t see it.




    0



    0
  2. szama says:

    @chetan: only the currently written block is not visible. So if you tried with a file that is smaller than the block size then D, but here it is explicit that the file is bigger than the block. The correct answer is C, but it has a typo, it should be something like “content of the file up to the last completed block”




    0



    0

Leave a Reply

Your email address will not be published. Required fields are marked *