diff --git spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java index c4495a9..bafdaaf 100644 --- spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java +++ spark-client/src/main/java/org/apache/hive/spark/client/SparkClientImpl.java @@ -501,16 +501,19 @@ public void run() { } } - 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); } } };