spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mridulm <...@git.apache.org>
Subject [GitHub] spark pull request #15618: [SPARK-14914][CORE] Fix Resource not closed after...
Date Fri, 28 Oct 2016 19:34:25 GMT
Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15618#discussion_r85436193
  
    --- Diff: streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala
---
    @@ -194,10 +194,13 @@ class ReceiverTracker(ssc: StreamingContext, skipReceiverLaunch:
Boolean = false
           // Finally, stop the endpoint
           ssc.env.rpcEnv.stop(endpoint)
           endpoint = null
    -      receivedBlockTracker.stop()
           logInfo("ReceiverTracker stopped")
           trackerState = Stopped
         }
    +
    +    // note that the output writer is created at construction time, we have to close
    +    // them even if it hasn't been started.
    +    receivedBlockTracker.stop()
    --- End diff --
    
    Is stop expected to be idempotent in this context ? Multiple invocations wont have an
issue ?
    (After this change, it can be invoked repeatedly even when trackerState == stopped).
    
    This is not part of tests ... hence my query.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message