@ -229,16 +229,17 @@ public class MasterServer implements IStoppable {
// close spring Context and will invoke method with @PreDestroy annotation to destory beans. like ServerNodeManager,HostManager,TaskResponseService,CuratorZookeeperClient,etc
// close spring Context and will invoke method with @PreDestroy annotation to destory beans. like ServerNodeManager,HostManager,TaskResponseService,CuratorZookeeperClient,etc
springApplicationContext.close();
springApplicationContext.close();
logger.info("springApplicationContext close");
logger.info("springApplicationContext close");
}catch(Exceptione){
logger.error("master server stop exception ",e);
}finally{
try{
try{
// thread sleep 60 seconds for quietly stop
// thread sleep 60 seconds for quietly stop
Thread.sleep(60000L);
Thread.sleep(60000L);
}catch(Exceptione){
}catch(Exceptione){
logger.warn("thread sleep exception ",e);
logger.warn("thread sleep exception ",e);
}
}
System.exit(1);
// Since close will be executed in hook, so we can't use System.exit here.