Given a job ID, this directly executes the corresponding job.<p>

@param jobId the job id
345273
public void executeDirectly(String jobId) {

        final CmsScheduledJobInfo jobInfo = (CmsScheduledJobInfo)getJob(jobId).clone();
        if (jobInfo == null) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_JOB_1, "null"));
            return;
        }
        Thread thread = new Thread() {

            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {

                executeJob(jobInfo);
            }
        };
        thread.start();
    }
1327599
@RunAsSystem
  public void executeScheduledJob(String scheduledJobId) {
    ScheduledJob scheduledJob =
        dataService.findOneById(SCHEDULED_JOB, scheduledJobId, ScheduledJob.class);
    if (scheduledJob == null) {
      throw new UnknownEntityException(SCHEDULED_JOB, scheduledJobId);
    }

    JobExecution jobExecution = createJobExecution(scheduledJob);
    Job molgenisJob = saveExecutionAndCreateJob(jobExecution);

    Progress progress = jobExecutionRegistry.registerJobExecution(jobExecution);
    try {
      runJob(jobExecution, molgenisJob, progress);
    } catch (Exception ex) {
      handleJobException(jobExecution, ex);
    } finally {
      jobExecutionRegistry.unregisterJobExecution(jobExecution);
    }
  }
535257
public static boolean runJob(JobConf job) throws IOException {
    JobClient jc = new JobClient(job);
    boolean sucess = true;
    RunningJob running = null;
    try {
      running = jc.submitJob(job);
      JobID jobId = running.getID();
      System.out.println("Job " + jobId + " is submitted");
      while (!running.isComplete()) {
        System.out.println("Job " + jobId + " is still running.");
        try {
          Thread.sleep(60000);
        } catch (InterruptedException e) {
        }
        running = jc.getJob(jobId);
      }
      sucess = running.isSuccessful();
    } finally {
      if (!sucess && (running != null)) {
        running.killJob();
      }
      jc.close();
    }
    return sucess;
  }
1284606
@Override
	public JobExecutionResult execute(String jobName) throws Exception {
		// transform the streaming program into a JobGraph
		StreamGraph streamGraph = getStreamGraph();
		streamGraph.setJobName(jobName);

		JobGraph jobGraph = streamGraph.getJobGraph();
		jobGraph.setAllowQueuedScheduling(true);

		Configuration configuration = new Configuration();
		configuration.addAll(jobGraph.getJobConfiguration());
		configuration.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, "0");

		// add (and override) the settings with what the user defined
		configuration.addAll(this.configuration);

		if (!configuration.contains(RestOptions.BIND_PORT)) {
			configuration.setString(RestOptions.BIND_PORT, "0");
		}

		int numSlotsPerTaskManager = configuration.getInteger(TaskManagerOptions.NUM_TASK_SLOTS, jobGraph.getMaximumParallelism());

		MiniClusterConfiguration cfg = new MiniClusterConfiguration.Builder()
			.setConfiguration(configuration)
			.setNumSlotsPerTaskManager(numSlotsPerTaskManager)
			.build();

		if (LOG.isInfoEnabled()) {
			LOG.info("Running job on local embedded Flink mini cluster");
		}

		MiniCluster miniCluster = new MiniCluster(cfg);

		try {
			miniCluster.start();
			configuration.setInteger(RestOptions.PORT, miniCluster.getRestAddress().get().getPort());

			return miniCluster.executeJobBlocking(jobGraph);
		}
		finally {
			transformations.clear();
			miniCluster.close();
		}
	}
1300530
protected void showReportDialog(String jobid) {

        CmsPublishReport pReport = new CmsPublishReport(jobid);
        final Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
        CmsBasicDialog dialog = new CmsBasicDialog();
        dialog.addButton(
            new Button(
                CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CLOSE_0),
                new com.vaadin.ui.Button.ClickListener() {

                    private static final long serialVersionUID = -4216949392648631634L;

                    public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {

                        window.close();

                    }
                }),
            true);
        dialog.setContent(pReport);
        window.setContent(dialog);
        window.setCaption(pReport.getCaption());
        A_CmsUI.get().addWindow(window);
    }
523407
public CompletableFuture<JobDetailsInfo> getJobDetails(JobID jobId) {
		final JobDetailsHeaders detailsHeaders = JobDetailsHeaders.getInstance();
		final JobMessageParameters  params = new JobMessageParameters();
		params.jobPathParameter.resolve(jobId);

		return sendRequest(
			detailsHeaders,
			params);
	}
891936
private Acknowledge startJobExecution(JobMasterId newJobMasterId) throws Exception {

		validateRunsInMainThread();

		checkNotNull(newJobMasterId, "The new JobMasterId must not be null.");

		if (Objects.equals(getFencingToken(), newJobMasterId)) {
			log.info("Already started the job execution with JobMasterId {}.", newJobMasterId);

			return Acknowledge.get();
		}

		setNewFencingToken(newJobMasterId);

		startJobMasterServices();

		log.info("Starting execution of job {} ({}) under job master id {}.", jobGraph.getName(), jobGraph.getJobID(), newJobMasterId);

		resetAndScheduleExecutionGraph();

		return Acknowledge.get();
	}
1210307
public void executeJob() {
        AbstractApplicationContext springContext = SpringContext.getContext(getSpringConfigurationClass());
        StreamingCinchJob cinchJob = springContext.getBean(StreamingCinchJob.class);

        cinchJob.execute(this);
    }
987577
private void registerExecutingJob(long jobExecutionId, BatchJobWorkUnit workUnit) {

        if (executingJobs.containsKey(jobExecutionId)) {
            throw new IllegalStateException("Already have entry in executingJobs map for job exec id = " + jobExecutionId);
        }

        executingJobs.put(jobExecutionId, workUnit);
    }
1152658
public void setJobName (final String jobName)
  {
    if (jobName == null || jobName.trim ().length () == 0)
    {
      throw new IllegalArgumentException ("Job name cannot be null or empty.");
    }

    m_sJobName = jobName;
  }
845562
public void executeJob(String jobName) throws MangooSchedulerException {
        Objects.requireNonNull(this.quartzScheduler, Required.SCHEDULER.toString());
        Objects.requireNonNull(jobName, Required.JOB_NAME.toString());
        
        try {
            for (JobKey jobKey : getAllJobKeys()) {
                if (jobKey.getName().equalsIgnoreCase(jobName)) {
                    this.quartzScheduler.triggerJob(jobKey);  
                }
            }
        } catch (SchedulerException | MangooSchedulerException e) {
            throw new MangooSchedulerException(e);
        }
    }
1243657
public static JobId fromString(final String id) {
    try {
      return parse(id);
    } catch (JobIdParseException e) {
      throw new IllegalArgumentException(e);
    }
  }
196662
public AbstractJobVertex findVertexByID(final JobVertexID id) {

		if (this.inputVertices.containsKey(id)) {
			return this.inputVertices.get(id);
		}

		if (this.outputVertices.containsKey(id)) {
			return this.outputVertices.get(id);
		}

		if (this.taskVertices.containsKey(id)) {
			return this.taskVertices.get(id);
		}

		return null;
	}
1119073
public void addJobType(final String jobName, final Class<?> jobType) {
        checkJobType(jobName, jobType);
        this.jobTypes.put(jobName, jobType);
    }
751586
public boolean executeJob(String jobName, String jobGroupName) {
        try {
            this.scheduler.triggerJob(new JobKey(jobName, jobGroupName));
            return true;
        } catch (SchedulerException e) {
            logger.error("error executing job: " + jobName + " in group: " + jobGroupName, e);
        }
        return false;
    }
87252
public JsonResponse getJobStatus(String jobId) throws IOException {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put(Job.JOB_ID, jobId);
        return apiGet(ApiAction.job, params);
    }
129114
public void setJobClass (final Class <? extends IJob> jobClass)
  {
    if (jobClass == null)
    {
      throw new IllegalArgumentException ("Job class cannot be null.");
    }

    if (!IJob.class.isAssignableFrom (jobClass))
    {
      throw new IllegalArgumentException ("Job class must implement the Job interface.");
    }

    m_aJobClass = jobClass;
  }