Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20388#discussion_r163939044
  
    --- Diff: 
launcher/src/main/java/org/apache/spark/launcher/AbstractAppHandle.java ---
    @@ -99,8 +100,6 @@ boolean isDisposed() {
        */
       synchronized void dispose() {
         if (!isDisposed()) {
    -      // Unregister first to make sure that the connection with the app 
has been really
    -      // terminated.
           server.unregister(this);
           if (!getState().isFinal()) {
    --- End diff --
    
    It's not necessary, but it makes it clear that the code only wants to 
override the state in that case without having to read the code for `setState`.
    
    (Or I could call `setState(LOST, false)` explicitly, I guess.)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to