spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vanzin <...@git.apache.org>
Subject [GitHub] spark pull request #20297: [SPARK-23020][CORE] Fix races in launcher code, t...
Date Fri, 19 Jan 2018 18:16:42 GMT
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20297#discussion_r162694343
  
    --- Diff: launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java ---
    @@ -331,23 +358,27 @@ protected void handle(Message msg) throws IOException {
               timeout.cancel();
             }
             close();
    +        if (handle != null) {
    +          handle.dispose();
    +        }
           } finally {
             timeoutTimer.purge();
           }
         }
     
         @Override
         public void close() throws IOException {
    +      if (!isOpen()) {
    +        return;
    +      }
    +
           synchronized (clients) {
             clients.remove(this);
           }
    -      super.close();
    -      if (handle != null) {
    -        if (!handle.getState().isFinal()) {
    -          LOG.log(Level.WARNING, "Lost connection to spark application.");
    -          handle.setState(SparkAppHandle.State.LOST);
    -        }
    -        handle.disconnect();
    --- End diff --
    
    See https://github.com/apache/spark/pull/20297#pullrequestreview-89568079


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message