Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st. We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here. Need help or have questions? Drop us a line at [email protected]
When you create a database or internal tables in hive cli then by default it creates with 777 permission.Even though if you have umask in hdfs then also it will be same permission. But now you can change it with the help of following steps.
1.From the command line in the Ambari server node, edit the file
vi /var/lib/ambari–server/resources/common–services/HIVE/0.12.0.2.0/package/scripts/hive.py
Search for hive_apps_whs_dir which should go to this block:
params.HdfsResource(params.hive_apps_whs_dir,
type=“directory”,
action=“create_on_execute”,
owner=params.hive_user,
group=params.user_group,
mode=0755
)
2. Modify the value for mode from 0777 to the desired permission, for example 0750.Save and close the file.
3. Restart the Ambari server to propagate the change to all nodes in the cluster:
ambari–server restart
4. From the Ambari UI, restart HiveServer2 to apply the new permission to the warehouse directory. If multiple HiveServer2 instances are configured, any one instance can be restarted.