Cloudera
CCA-500 · Question #67
You set the value of dfs.block.size to 64MB in hdfs-site.xml on a client machine, but you set the same property to 128MB on your clusters name node. What happens when the client writes a file to HDFS?
The correct answer is B. A block size of 64MB will be used. The configuration parameter "dfs.block.size" defined within hdfs-site.xml on name node and data node is completely ignored when files are created using client utility. Client side hdfs-site.xml has the highest precedence over all others. When files are created using MapReduce…
Troubleshooting
Question
You set the value of dfs.block.size to 64MB in hdfs-site.xml on a client machine, but you set the same property to 128MB on your clusters name node. What happens when the client writes a file to HDFS?
Options
- AAn execution will be thrown when the client attempts to write the file, because the values are different.
- BA block size of 64MB will be used
- CA block size of 128MB will be used
- DThe file will be written successfully with a block size of 64MB but client attempting to read the file will
How the community answered
(28 responses)- A4% (1)
- B71% (20)
- C18% (5)
- D7% (2)
Explanation
- The configuration parameter "dfs.block.size" defined within hdfs-site.xml on name node and data node is completely ignored when files are created using client utility. Client side hdfs-site.xml has the highest precedence over all others. * When files are created using MapReduce The parameter "dfs.block.size" is defined in "hdfs-site.xml" and can have different values between name node and data nodes. Remember that "dfs.block.size" is client specific and has no effect on NN or DN. The only time NN or DN configuration comes into play is when files are created using MapReduce. * The configuration parameter "dfs.block.size" is used if defined at multiple levels with different values. These levels are defined / Master - When properties are defined at name node / master node level / Slave - When properties are defined at data node / slave node level / Client - There are two type of commands that can be submitted by client o A client utility like "hadoop fs -put" o A MapReduce job submitted by the client * dfs.block.size The default block size for new files, in bytes.
Topics
#HDFS block size#client configuration#configuration precedence#hdfs-site.xml
Community Discussion
No community discussion yet for this question.