private void doStop(ProgramRuntimeService.RuntimeInfo runtimeInfo)
throws ExecutionException, InterruptedException {
Preconditions.checkNotNull(runtimeInfo, UserMessages.getMessage(UserErrors.RUNTIME_INFO_NOT_FOUND));
ProgramController controller = runtimeInfo.getController();
controller.stop().get();
}
/** NOTE: This was a temporary hack done to map the status to something that is
* UI friendly. Internal states of program controller are reasonable and hence
* no point in changing them.