Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16416

Shutdown the task manager gracefully in standalone mode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Command Line Client
    • None

    Description

      Recently, I try to add a new GPUManager to the TaskExecutorServices. I register the "GPUManager#close" function, in which I write some cleanup logic, to the TaskExecutorServices#shutDown. However, I found that the cleanup logic does not run as expected in standalone mode.
      After an investigation in the codebase, I found that the TaskExecutorServices#shutDown will be called only on a fatal error while we just kill the TM process in the flink-daemon.sh. However, the LOG shows that some services, e.g. TaskExecutorLocalStateStoresManager, did clean up themselves by registering shutdownHook.
      If that is the right way, then we need to register a shutdownHook for TaskExecutorServices as well.
      If that is not, we may find another solution to shutdown TM gracefully.

      Attachments

        Activity

          People

            Unassigned Unassigned
            guoyangze Yangze Guo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: