예제 #1
0
 /**
  * Resume a cube job
  *
  * @return
  * @throws IOException
  */
 @RequestMapping(
     value = "/{jobId}/resume",
     method = {RequestMethod.PUT})
 @ResponseBody
 public JobInstance resume(@PathVariable String jobId) {
   try {
     final JobInstance jobInstance = jobService.getJobInstance(jobId);
     jobService.resumeJob(jobInstance);
     return jobService.getJobInstance(jobId);
   } catch (Exception e) {
     logger.error(e.getLocalizedMessage(), e);
     throw new InternalErrorException(e);
   }
 }
예제 #2
0
  /**
   * Get a cube job
   *
   * @return
   * @throws IOException
   */
  @RequestMapping(
      value = "/{jobId}",
      method = {RequestMethod.GET})
  @ResponseBody
  public JobInstance get(@PathVariable String jobId) {
    JobInstance jobInstance = null;
    try {
      jobInstance = jobService.getJobInstance(jobId);
    } catch (Exception e) {
      logger.error(e.getLocalizedMessage(), e);
      throw new InternalErrorException(e);
    }

    return jobInstance;
  }