Package org.springframework.batch.core

Examples of org.springframework.batch.core.JobExecution.stop()


    // wait a bit for the job to be started
    while (!(JobUtils.getStatus(victimJob).isRunning() || JobUtils.getStatus(victimJob).isFinished())) {
      Thread.sleep(WAIT_FOR_JOB_TO_START);
    }

    batchJob.stop();

    checkHadoopJobWasKilled(victimJob);
  }

  private static void checkHadoopJobWasKilled(Job victimJob) throws Exception {
View Full Code Here


    Thread.sleep(1000);

    assertEquals(BatchStatus.STARTED, jobExecution.getStatus());
    assertTrue(jobExecution.isRunning());

    jobExecution.stop();

    int count = 0;
    while (jobExecution.isRunning() && count <= 10) {
      logger.info("Checking for end time in JobExecution: count=" + count);
      Thread.sleep(100);
View Full Code Here

    if (!jobExecution.isRunning()) {
      throw new JobExecutionNotRunningException("JobExecution is not running and therefore cannot be stopped");
    }

    logger.info("Stopping job execution: " + jobExecution);
    jobExecution.stop();
    jobRepository.update(jobExecution);
    return jobExecution;

  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.