Many components use HdfsResource to add files and directories to HDFS. One
of the parameters to HdfsResource is the mode. As an example:
params.HdfsResource("/user/hive",
type="directory",
action="create_on_execute",
owner="hive",
mode="0700"
)
Post install if I were to manually change the permissions on /user/hive to
777 and restart hive, the HDFS permissions on /user/hive will be reset to
700 because the HdfsResource runs again. HdfsResource will do the
following operations (assuming we are creating a directory):
Create the directory
Change the permissions
Change the owner
Assuming the directory already exists the first of those steps is a no-op
but the 2 remaining steps are still run. I understand this may can be
useful if someone where to change the permissions to something which would
break like 000 but in the case I mentioned where I am expanding the
permissions in could in theory check to see if the minimum permissions are
met and if so leave the current permissions as is.
Obviously it is easy enough to change the permissions in the python scripts
as a workaround if you really need to have non-standard permissions on HDFS
directories.
Thoughts?
Thanks
__________________________________________
Tim Thorpe
IBM Information Management - Ottawa Lab
Email: [email protected]