Review Board 1.7.22

HBASE-5526: Configurable file and directory based umask

Review Request #4217 - Created March 7, 2012 and submitted

Jesse Yates
Currently many all the files created by the HBase user are just written using the default file permissions granted by hdfs. However, to ensure only the correct user/group views the files and directories, we need to be able to apply a configurable umask to either directories or files.

This ticket covers setting permissions for files written to dfs, as opposed to things like pid and log files.

The impetus for this was to allow the web-user to view the directory structure of hbase, but not to actually see any of the actual data hbase is storing.
"mvn clean test -P localTests" passes
Review request changed
Updated (March 8, 2012, 6:31 p.m.)
New patch addressing Ted and Lars' comments. Thanks guys!
Ship it!
Posted (March 8, 2012, 6:39 p.m.)
One minor comment and some whitespace (can fix upon commit).
We don't log in the HFile case above.
I guess we log either in both cases or not at all.
LOG.debug in both cases seems fine to me.
  1. Prefer to drop this as we already have the debug comment in FSUtils.create for the file and perms being created. This is just excessive logging.
    I'll post a new version and try to get most of the whitespace issues on the original ticket.