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

    https://github.com/apache/spark/pull/1609#discussion_r15553689
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -947,6 +958,34 @@ private[spark] object Utils extends Logging {
         }
         false
       }
    +  /*
    +  @volatile private var shutdownStarted = false
    +  private[spark] def setShutdownStarted() {
    +    shutdownStarted = true
    +  }
    +
    +  def inShutdown(): Boolean = {
    +    if (shutdownStarted) return true
    +    doShutdownCheck()
    +    shutdownStarted
    +  }
    +
    +  private[spark] def doShutdownCheck() {
    +    var shutdown = false
    +    try {
    +      val hook = new Thread {
    +        override def run() {}
    +      }
    +      Runtime.getRuntime.addShutdownHook(hook)
    +      Runtime.getRuntime.removeShutdownHook(hook)
    +    } catch {
    +      case ise: IllegalStateException =>
    +        shutdown = true
    +    } finally {
    +      shutdownStarted = shutdown
    +    }
    +  }
    +  */
    --- End diff --
    
    IMO we should leave this out of the patch if it's dead code. You can open a 
JIRA with it instead and attach the code there.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to