Repository: hive
Updated Branches:
  refs/heads/master e33edd964 -> 89e75c785


HIVE-17837: Explicitly check if the HoS Remote Driver has been lost in the 
RemoteSparkJobMonitor (Sahil Takiar, reviewed by Rui Li)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/89e75c78
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/89e75c78
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/89e75c78

Branch: refs/heads/master
Commit: 89e75c78524327ef0c6111b4d90504f3bda781d4
Parents: e33edd9
Author: Sahil Takiar <takiar.sa...@gmail.com>
Authored: Fri Feb 9 15:03:15 2018 -0800
Committer: Sahil Takiar <stak...@cloudera.com>
Committed: Fri Feb 9 15:03:15 2018 -0800

----------------------------------------------------------------------
 .../hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/89e75c78/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java
index 4c4ce55..22f7024 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/RemoteSparkJobMonitor.java
@@ -66,6 +66,7 @@ public class RemoteSparkJobMonitor extends SparkJobMonitor {
     while (true) {
       try {
         JobHandle.State state = sparkJobStatus.getRemoteJobState();
+        Preconditions.checkState(sparkJobStatus.isRemoteActive(), "Connection 
to remote Spark driver was lost");
 
         switch (state) {
         case SENT:
@@ -133,10 +134,6 @@ public class RemoteSparkJobMonitor extends SparkJobMonitor 
{
 
             printStatus(progressMap, lastProgressMap);
             lastProgressMap = progressMap;
-          } else if (sparkJobState == null) {
-            // in case the remote context crashes between JobStarted and 
JobSubmitted
-            Preconditions.checkState(sparkJobStatus.isRemoteActive(),
-                "Remote context becomes inactive.");
           }
           break;
         case SUCCEEDED:

Reply via email to