Review Board 1.7.22

HIVE-4487 (Hive does not set explicit permissions on hive.exec.scratchdir)

Review Request #12049 - Created June 22, 2013 and updated

Chaoyu Tang
The changes include:
1. a new property hive.scratch.dir.permission with default value 700 to control the permission of dirs created directly under scratchdir (local and hdfs)
2. only the directories directly under hdfs /tmp/hive-{username} or local /tmp/{username} will be set to the permission as specified by above property. These include ones created for the mapred jobs. By doing so,  we will add the protection to newly created dirs/files with minimal code change, and also preserve the permissions of the existing scratchdirs (for back-compatibility).
Manual tests
Review request changed
Updated (June 22, 2013, 6:35 p.m.)
Update the diff