You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2017/07/05 17:33:33 UTC
hive git commit: HIVE-16961: Hive on Spark leaks spark application in
case user cancels query and closes session (reviewed by Rui)
Repository: hive
Updated Branches:
refs/heads/master 26f1bdeb4 -> 0731dab18
HIVE-16961: Hive on Spark leaks spark application in case user cancels query and closes session (reviewed by Rui)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0731dab1
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0731dab1
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0731dab1
Branch: refs/heads/master
Commit: 0731dab18c85363d4bad8a556c437a587277143c
Parents: 26f1bde
Author: Xuefu Zhang <xu...@uber.com>
Authored: Wed Jul 5 10:33:18 2017 -0700
Committer: Xuefu Zhang <xu...@uber.com>
Committed: Wed Jul 5 10:33:18 2017 -0700
----------------------------------------------------------------------
.../org/apache/hive/spark/client/SparkClientImpl.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/0731dab1/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
----------------------------------------------------------------------
diff --git a/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java b/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
index bf7e8db..03e773a 100644
--- a/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
+++ b/spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java
@@ -508,16 +508,19 @@ class SparkClientImpl implements SparkClient {
}
}
- rpcServer.cancelClient(clientId,
- "Child process exited before connecting back with error log " + errStr.toString());
LOG.warn("Child process exited with code {}", exitCode);
+ rpcServer.cancelClient(clientId,
+ "Child process (spark-submit) exited before connecting back with error log " + errStr.toString());
}
} catch (InterruptedException ie) {
- LOG.warn("Waiting thread interrupted, killing child process.");
+ LOG.warn("Thread waiting on the child process (spark-submit) is interrupted, killing the child process.");
+ rpcServer.cancelClient(clientId, "Thread waiting on the child porcess (spark-submit) is interrupted");
Thread.interrupted();
child.destroy();
} catch (Exception e) {
- LOG.warn("Exception while waiting for child process.", e);
+ String errMsg = "Exception while waiting for child process (spark-submit)";
+ LOG.warn(errMsg, e);
+ rpcServer.cancelClient(clientId, errMsg);
}
}
};