@Test(expected = RuntimeException.class) public void testResume() throws IOException { JobBuildRequest jobBuildRequest = new JobBuildRequest(); jobBuildRequest.setBuildType("BUILD"); jobBuildRequest.setStartTime(20130331080000L); jobBuildRequest.setEndTime(20131212080000L); JobInstance job = cubeController.rebuild(CUBE_NAME, jobBuildRequest); jobSchedulerController.resume(job.getId()); }
@RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody public JobInstance resume(@PathVariable String jobId) { try { jobService.resumeJob(jobId); return jobService.getJobInstance(jobId); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e); } }
JobController extends BasicController implements InitializingBean { @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody public JobInstance resume(@PathVariable String jobId) { try { jobService.resumeJob(jobId); return jobService.getJobInstance(jobId); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e); } } }
JobController extends BasicController implements InitializingBean { @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody public JobInstance resume(@PathVariable String jobId) { try { jobService.resumeJob(jobId); return jobService.getJobInstance(jobId); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e); } }  }
JobController extends BasicController implements InitializingBean { @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody public JobInstance resume(@PathVariable String jobId) { try { jobService.resumeJob(jobId); return jobService.getJobInstance(jobId); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e); } }  @Override void afterPropertiesSet(); @RequestMapping(value = "", method = { RequestMethod.GET }) @ResponseBody List<JobInstance> list(JobListRequest jobRequest); @RequestMapping(value = "/{jobId}", method = { RequestMethod.GET }) @ResponseBody JobInstance get(@PathVariable String jobId); @RequestMapping(value = "/{jobId}/steps/{stepId}/output", method = { RequestMethod.GET }) @ResponseBody Map<String, String> getStepOutput(@PathVariable String jobId, @PathVariable String stepId); @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody JobInstance resume(@PathVariable String jobId); @RequestMapping(value = "/{jobId}/cancel", method = { RequestMethod.PUT }) @ResponseBody JobInstance cancel(@PathVariable String jobId); void setJobService(JobService jobService); }
JobController extends BasicController implements InitializingBean { @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody public JobInstance resume(@PathVariable String jobId) { try { jobService.resumeJob(jobId); return jobService.getJobInstance(jobId); } catch (Exception e) { logger.error(e.getLocalizedMessage(), e); throw new InternalErrorException(e); } }  @Override void afterPropertiesSet(); @RequestMapping(value = "", method = { RequestMethod.GET }) @ResponseBody List<JobInstance> list(JobListRequest jobRequest); @RequestMapping(value = "/{jobId}", method = { RequestMethod.GET }) @ResponseBody JobInstance get(@PathVariable String jobId); @RequestMapping(value = "/{jobId}/steps/{stepId}/output", method = { RequestMethod.GET }) @ResponseBody Map<String, String> getStepOutput(@PathVariable String jobId, @PathVariable String stepId); @RequestMapping(value = "/{jobId}/resume", method = { RequestMethod.PUT }) @ResponseBody JobInstance resume(@PathVariable String jobId); @RequestMapping(value = "/{jobId}/cancel", method = { RequestMethod.PUT }) @ResponseBody JobInstance cancel(@PathVariable String jobId); void setJobService(JobService jobService);  }