- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to change hive session folder from /tmp to other folder
- Labels:
-
Apache Hive
Created ‎10-12-2017 11:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found there are 10,000+ folder owned by hive:hadoop under /tmp locally, folder name is {session_id}_resources(eg. 0003f01d-07e5-4caa-bb4f-61e62d35f426_resources). And the folder is empty, can I delete them? And how can I config to store them in another folder? They have been there 1 month ago. No one use these folder anymore.
I think it is created by hive session. I found JIRA describe similar bug: https://issues.apache.org/jira/browse/HIVE-4546, but this bug has been fixed from hive version 0.12.0. The hive version here is 1.2.1.2.6. It shouldn't have this issue again. Any idea on how to prevent leaving these hive session folder? Or is there a way to have these in a subfolder, e.g. /tmp/hive_session/0003f01d-07e5-4caa-bb4f-61e62d35f426_resources/
Created ‎10-12-2017 11:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solution:
Go to Ambari Hive Configs page.
Then find Custom hive-site
Add following arguments:
hive.downloaded.resources.dir=/tmp/hive/${hive.session.id}_resources
Then save the modification and do a Rolling Restart of related component.
We can delete all ages {session_id}_resources folder under /tmp, and start a hive client, run some SQL, then check the new session folder will be generated in /tmp/hive/ folder.
Created ‎10-12-2017 11:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solution:
Go to Ambari Hive Configs page.
Then find Custom hive-site
Add following arguments:
hive.downloaded.resources.dir=/tmp/hive/${hive.session.id}_resources
Then save the modification and do a Rolling Restart of related component.
We can delete all ages {session_id}_resources folder under /tmp, and start a hive client, run some SQL, then check the new session folder will be generated in /tmp/hive/ folder.
