Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
In the current master, when connecting to HS2, we can confirm that some directories were created. For example the following messages of HS2 log.
2016-02-14T13:57:52,412 INFO [HiveServer2-Handler-Pool: Thread-607]: session.SessionState (SessionState.java:createPath(693)) - Created HDFS directory: /tmp/hive/root/bfe28a51-5804-4cbb-952c-26709aed4652 2016-02-14T13:57:52,416 INFO [HiveServer2-Handler-Pool: Thread-607]: session.SessionState (SessionState.java:createPath(693)) - Created local directory: /tmp/hive/bfe28a51-5804-4cbb-952c-26709aed4652 2016-02-14T13:57:52,419 INFO [HiveServer2-Handler-Pool: Thread-607]: session.SessionState (SessionState.java:createPath(693)) - Created HDFS directory: /tmp/hive/root/bfe28a51-5804-4cbb-952c-26709aed4652/_tmp_space.db 2016-02-14T13:57:52,421 INFO [HiveServer2-Handler-Pool: Thread-607]: session.HiveSessionImpl (HiveSessionImpl.java:setOperationLogSessionDir(287)) - Operation log session directory is created: /tmp/hive/operation_logs/bfe28a51-5804-4cbb-952c-26709aed4652
But when closing from HS2, we cannot confirm that these directories were deleted. So I change it so that some messages about these directories deletion may be output as follows.
2016-02-14T13:57:56,877 INFO [bfe28a51-5804-4cbb-952c-26709aed4652bfe28a51-5804-4cbb-952c-26709aed4652HiveServer2-Handler-Pool: Thread-607]: session.HiveSessionImpl (HiveSessionImpl.java:cleanupSessionLogDir(690)) - Operation log session directory is deleted: /tmp/hive/operation_logs/bfe28a51-5804-4cbb-952c-26709aed4652 2016-02-14T13:57:56,890 INFO [bfe28a51-5804-4cbb-952c-26709aed4652bfe28a51-5804-4cbb-952c-26709aed4652HiveServer2-Handler-Pool: Thread-607]: session.SessionState (SessionState.java:dropSessionPaths(750)) - Deleted HDFS directory: /tmp/hive/root/bfe28a51-5804-4cbb-952c-26709aed4652 2016-02-14T13:57:56,891 INFO [bfe28a51-5804-4cbb-952c-26709aed4652bfe28a51-5804-4cbb-952c-26709aed4652HiveServer2-Handler-Pool: Thread-607]: session.SessionState (SessionState.java:dropSessionPaths(754)) - Deleted local directory: /tmp/hive/bfe28a51-5804-4cbb-952c-26709aed4652