Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-183

Supervisor/worker shutdown hook should be called in distributed mode.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.3
    • Component/s: storm-core
    • Labels:
      None

      Description

      if the process is killed forcefully from the OS or if it's crashing due to resource issues (e.g., out of memory), shutdown hooks won't be invoked.
      -TERM (15)
      The process is requested to stop running; it should try to exit cleanly
      -KILL (9)
      The process will be killed by the kernel; this signal cannot be ignored.
      So should we better use 'kill -15' ?
      See:
      https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/util.clj#L392

      https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L175

      will never be called for supervisor:
      https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/supervisor.clj#L396

      will never be called for worker:
      https://github.com/apache/incubator-storm/blob/master/storm-core/src/clj/backtype/storm/daemon/worker.clj#L421

      We'd better add something like :
      (.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.shutdown mk-sv)))))) ?

        Attachments

        1. STORM-183-1.patch
          2 kB
          caofangkun

          Issue Links

            Activity

              People

              • Assignee:
                parth.brahmbhatt Parth Brahmbhatt
                Reporter:
                caofangkun caofangkun
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: