Package org.apache.flink.runtime.client

Examples of org.apache.flink.runtime.client.JobCancelResult


          // Cancel job
          if (startingTime + msecsTillCanceling < now) {

            LOG.info("Issuing cancel request");

            final JobCancelResult jcr = client.cancelJob();

            if (jcr == null) {
              throw new IllegalStateException("Return value of cancelJob is null!");
            }

            if (jcr.getReturnCode() != AbstractJobResult.ReturnCode.SUCCESS) {
              throw new IllegalStateException(jcr.getDescription());
            }

            // Save when the cancel request has been issued
            cancelTime = now;
          }
View Full Code Here


    LOG.info("Trying to cancel job with ID " + jobID);

    final ExecutionGraph eg = this.currentJobs.get(jobID);
    if (eg == null) {
      LOG.info("No job found with ID " + jobID);
      return new JobCancelResult(ReturnCode.ERROR, "Cannot find job with ID " + jobID);
    }

    final Runnable cancelJobRunnable = new Runnable() {
      @Override
      public void run() {
        eg.cancel();
      }
    };

    eg.execute(cancelJobRunnable);

    return new JobCancelResult(AbstractJobResult.ReturnCode.SUCCESS, null);
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.client.JobCancelResult

Copyright © 2018 www.massapicom. 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.