Hadoop DFS. umask

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.