DFS. umask can be used to control the attributes of folders and files created on HDFS. The default value is 0022.
In hadoop, the DFS. umask parameter can be used to control the default file permissions.
DFS. umask settings
<Property> <Name> DFS. umask </Name> <value> 0002 </value> </property>
This parameter is not the same as umask in Linux.
For example, if you want to set the file attribute to-RW-r-, set umask to 022 in Linux and DFS. when the mask value is 0022, the result is not what I want.
It is then sent to the 10-in-hexadecimal value stored by DFS. umask. For the 022 of the Linux umask, the 10-in-hexadecimal value is 0018.
The settings are as follows:
<Property> <Name> DFS. umask </Name> <value> 0018 </value> </property>
Create a file again. The permission is correct.
-RW-r-1 hadoop supergroup 5/sunwg/3.dat
Transferred from http://www.oratea.net /? P = 1279