示例#1
0
 def shutdown(self, driver):
     log.critical("Shutting down executor...")
     for taskId, pid in self.runningTasks.items():
         self.killTask(driver, taskId)
     Resource.cleanSystem()
     AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)
     log.critical("Executor shut down")
示例#2
0
    def shutdown(self):
        """
        Cleanly terminate worker threads. Add sentinels to inputQueue equal to maxThreads. Join
        all worker threads.
        """
        # Remove reference to inputQueue (raises exception if inputQueue is used after method call)
        inputQueue = self.inputQueue
        self.inputQueue = None
        for i in xrange(self.numWorkers):
            inputQueue.put(None)

        for thread in self.workerThreads:
            thread.join()
        AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)
示例#3
0
    def shutdown(self):
        """
        Cleanly terminate worker threads. Add sentinels to inputQueue equal to maxThreads. Join
        all worker threads.
        """
        # Remove reference to inputQueue (raises exception if inputQueue is used after method call)
        inputQueue = self.inputQueue
        self.inputQueue = None
        for i in xrange(self.numWorkers):
            inputQueue.put(None)

        for thread in self.workerThreads:
            thread.join()
        AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)