wynot12 commented on a change in pull request #73: [Nemo-62] Support Multiple Jobs Submission in a Single User Program URL: https://github.com/apache/incubator-nemo/pull/73#discussion_r201412732
########## File path: runtime/driver/src/main/java/edu/snu/nemo/driver/NemoDriver.java ########## @@ -96,8 +98,13 @@ private NemoDriver(final UserApplicationRunner userApplicationRunner, this.glusterDirectory = glusterDirectory; this.handler = new RemoteClientMessageLoggingHandler(client); this.clientRPC = clientRPC; - clientRPC.registerHandler(ControlMessage.ClientToDriverMessageType.LaunchDAG, - message -> startSchedulingUserApplication(message.getLaunchDAG().getDag())); + clientRPC.registerHandler(ControlMessage.ClientToDriverMessageType.LaunchDAG, message -> + startSchedulingUserApplication(message.getLaunchDAG().getDag())); + clientRPC.registerHandler(ControlMessage.ClientToDriverMessageType.DriverShutdown, message -> { + LOG.info("Driver shutdown initiated"); + userApplicationRunnerThread.execute(runtimeMaster::terminate); + userApplicationRunnerThread.shutdown(); Review comment: How about to make a private method (e.g., terminate() or shutdown()) with L104~L106? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services