@Override public void start() { LOG.info("QueryMaster start"); queryHeartbeatThread = new QueryHeartbeatThread(); queryHeartbeatThread.start(); clientSessionTimeoutCheckThread = new ClientSessionTimeoutCheckThread(); clientSessionTimeoutCheckThread.start(); finishedQueryMasterTaskCleanThread = new FinishedQueryMasterTaskCleanThread(); finishedQueryMasterTaskCleanThread.start(); super.start(); }
@Override public void stop() { if (queryMasterStop.getAndSet(true)) { return; } if (queryHeartbeatThread != null) { queryHeartbeatThread.interrupt(); } if (clientSessionTimeoutCheckThread != null) { clientSessionTimeoutCheckThread.interrupt(); } if (finishedQueryMasterTaskCleanThread != null) { finishedQueryMasterTaskCleanThread.interrupt(); } super.stop(); LOG.info("QueryMaster stop"); if (queryMasterContext.getWorkerContext().isYarnContainerMode()) { queryMasterContext.getWorkerContext().stopWorker(true); } }