Repository: hive Updated Branches: refs/heads/branch-1 72f71bb4b -> 9be86f3f4
HIVE-13498: cleardanglingscratchdir does not work if scratchdir is not on defaultFs Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/9be86f3f Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/9be86f3f Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/9be86f3f Branch: refs/heads/branch-1 Commit: 9be86f3f40dd2c2a52a7e9e3a337aae50e122243 Parents: 72f71bb Author: Daniel Dai <[email protected]> Authored: Fri Apr 15 16:11:38 2016 -0700 Committer: Daniel Dai <[email protected]> Committed: Fri Apr 15 16:11:38 2016 -0700 ---------------------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/9be86f3f/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java index bf17b43..07ce8cc 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java @@ -614,7 +614,7 @@ public class SessionState { conf.set(HDFS_SESSION_PATH_KEY, hdfsSessionPath.toUri().toString()); // 5. hold a lock file in HDFS session dir to indicate the it is in use if (conf.getBoolVar(HiveConf.ConfVars.HIVE_SCRATCH_DIR_LOCK)) { - FileSystem fs = FileSystem.get(conf); + FileSystem fs = hdfsSessionPath.getFileSystem(conf); hdfsSessionPathLockFile = fs.create(new Path(hdfsSessionPath, LOCK_FILE_NAME), true); hdfsSessionPathLockFile.writeUTF("hostname: " + InetAddress.getLocalHost().getHostName() + "\n"); hdfsSessionPathLockFile.writeUTF("process: " + ManagementFactory.getRuntimeMXBean().getName() + "\n");
