Runs the job

@return
439090
public AnalysisResultFuture run() {
        try {
            // the injection manager is job scoped
            final InjectionManager injectionManager = _configuration.getEnvironment().getInjectionManagerFactory()
                    .getInjectionManager(_configuration, _job);

            final LifeCycleHelper rowProcessingLifeCycleHelper =
                    new LifeCycleHelper(injectionManager, _includeNonDistributedTasks);

            final RowProcessingPublishers publishers =
                    new RowProcessingPublishers(_job, _analysisListener, _errorAware, _taskRunner,
                            rowProcessingLifeCycleHelper);

            final AnalysisJobMetrics analysisJobMetrics = publishers.getAnalysisJobMetrics();

            // A task listener that will register either succesfull executions
            // or unexpected errors (which will be delegated to the
            // errorListener)
            final JobCompletionTaskListener jobCompletionTaskListener =
                    new JobCompletionTaskListener(analysisJobMetrics, _analysisListener, 1);

            _analysisListener.jobBegin(_job, analysisJobMetrics);

            validateSingleTableInput(_job);

            // at this point we are done validating the job, it will run.
            scheduleRowProcessing(publishers, rowProcessingLifeCycleHelper, jobCompletionTaskListener,
                    analysisJobMetrics);

            return new AnalysisResultFutureImpl(_resultQueue, jobCompletionTaskListener, _errorAware);
        } catch (final RuntimeException e) {
            _analysisListener.errorUnknown(_job, e);
            throw e;
        }

    }
1066811
public int run(String jobName, String[] args) {
        int status = -1;

        try {
            Class<? extends SimpleJobTool> clazz = jobMap.get(jobName);
            if (clazz == null) {
                log.error("Tool " + jobName + " class not found.");
                return status;
            }
            status =  ToolRunner.run(clazz.newInstance(), args);
        } catch (Exception e) {
            e.printStackTrace();
            log.error(e);
        }

        return status;
    }
1003726
public SequencalJobExecuteResults runAll() {
        SequencalJobExecuteResults results = new SequencalJobExecuteResults();
        for (Job job : jobs) {
            job.setJarByClass(SequencalJobChain.class);
            try {
                boolean isSuccessful = job.waitForCompletion(true);
                results.add(new SequencalJobExecuteResult(isSuccessful, job.getJobName()));
                if (!isSuccessful) {
                    break;
                }
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return results;
    }
1076426
@Override
    public void run() {

        try {

            // Set up
            Path path = FileSystems.getDefault().getPath(this.path);
            watcher = FileSystems.getDefault().newWatchService();
            Scanner.start(path, watcher);

            while (true) {

                // Reload when notified
                synchronized (this) {
                    this.wait();
                }

                // Keep reloading until all changes have notified:
                while (reloadRequested) {
                    reloadRequested = false;
                    Reflections reflections = ClassFinder.newReflections();
                    ApiHandler.setupApi(reflections);
                    Main.mainHandler.setupFilters(reflections);
                    Main.mainHandler.runStartups(reflections);
                }

            }

        } catch (IOException | InterruptedException e) {
            try {
                shutdown();
                throw new RuntimeException("Error in " + ClassReloader.class.getSimpleName() + ", exiting.", e);
            } catch (IOException e1) {
                e.printStackTrace();
            }
        }

    }
358319
@Override
    public void run() {
        final ScheduledFuture<?> future = this.executor.scheduleWithFixedDelay(this.scheduled, 0, this.delayMillis,
                TimeUnit.MILLISECONDS);
        try {
            this.runTrigger.await();
        } catch (final InterruptedException e) {
            this.listener.handle(e);
        } finally {
            future.cancel(true); // stop the periodic reading
            this.scheduled.cleanup();
            this.executor.shutdownNow();
            this.listener.destroy();
        }
    }
219004
public function run() {
        $this->executor->setActual($this->actual);
        $this->executor->setPeticion($this->peticion);
        $this->executor->setCallback($this->configure->getConfig());
        $this->executor->exist();
        $this->executor->compare();
        $this->executor->execute();

	return $this;
    }
1226787
public function Run () {
		parent::PreRun();
		list($jobMethod, $params) = $this->completeJobAndParams();
		$this->$jobMethod($params);
		return $this;
	}
53509
def run(self):
        
        task = self.task
        self._outputs = self.output()

        # create the job dashboard interface
        self.dashboard = task.create_job_dashboard() or NoJobDashboard()

        # read submission data and reset some values
        submitted = not task.ignore_submission and self._outputs["submission"].exists()
        if submitted:
            self.submission_data.update(self._outputs["submission"].load(formatter="json"))
            task.tasks_per_job = self.submission_data.tasks_per_job
            self.dashboard.apply_config(self.submission_data.dashboard_config)

        # when the branch outputs, i.e. the "collection" exists, just create dummy control outputs
        if "collection" in self._outputs and self._outputs["collection"].exists():
            self.touch_control_outputs()

        # cancel jobs?
        elif self._cancel_jobs:
            if submitted:
                self.cancel()

        # cleanup jobs?
        elif self._cleanup_jobs:
            if submitted:
                self.cleanup()

        # submit and/or wait while polling
        else:
            # maybe set a tracking url
            tracking_url = self.dashboard.create_tracking_url()
            if tracking_url:
                task.set_tracking_url(tracking_url)

            # ensure the output directory exists
            if not submitted:
                self._outputs["submission"].parent.touch()

            # at this point, when the status file exists, it is considered outdated
            if "status" in self._outputs:
                self._outputs["status"].remove()

            try:
                # instantiate the configured job file factory, not kwargs yet
                self.job_file_factory = self.create_job_file_factory()

                # submit
                if not submitted:
                    # set the initial list of unsubmitted jobs
                    branches = sorted(task.branch_map.keys())
                    branch_chunks = list(iter_chunks(branches, task.tasks_per_job))
                    self.submission_data.unsubmitted_jobs = OrderedDict(
                        (i + 1, branches) for i, branches in enumerate(branch_chunks)
                    )
                    self.submit()

                    # sleep once to give the job interface time to register the jobs
                    post_submit_delay = self._get_task_attribute("post_submit_delay")()
                    if post_submit_delay:
                        time.sleep(post_submit_delay)

                # start status polling when a) no_poll is not set, or b) the jobs were already
                # submitted so that failed jobs are resubmitted after a single polling iteration
                if not task.no_poll or submitted:
                    self.poll()

            finally:
                # in any event, cleanup the job file
                if self.job_file_factory:
                    self.job_file_factory.cleanup_dir(force=False)
782066
public function run() {
        $this->input = new Input($this->docoptResult);
        $this->di()->set(Input::class, $this->input);

        if ($this->validator) $error = $this->validator->__invoke($this->input, $this->output);
        else                  $error = $this->validate($this->input, $this->output);

        if ($error)
            return $this->status = (int) $error;

        if ($this->task) $status = $this->task->__invoke($this->input, $this->output);
        else             $status = $this->execute($this->input, $this->output);

        return $this->status = (int) $status;
    }
1206674
public function run()
    {
        
        if (!empty($this->request)) {
            foreach ($this->request as $key => $value) {
                $this->_iterate($key, $value);
            }
        }
         
        return $this->getReport();
    }
797535
@Override
    public final void run() {
        String taskID = m_taskRecord.getTaskID();
        m_logger.debug("Starting task '{}' in tenant '{}'", taskID, m_tenant);
        try {
            TaskManagerService.instance().registerTaskStarted(this);
            m_lastProgressTimestamp = System.currentTimeMillis();
            setTaskStart();
            execute();
            setTaskFinish();
        } catch (Throwable e) {
            m_logger.error("Task '" + taskID + "' failed", e);
            String stackTrace = Utils.getStackTrace(e);
            setTaskFailed(stackTrace);
        } finally {
            TaskManagerService.instance().registerTaskEnded(this);
        }
    }
1207858
def run(self):
        ""
        while 1:
            # Sleep until there is a job to perform.
            job = self.jobs.get()

            # Yawn. Time to get some work done.
            try:
                job.run()
                self.jobs.task_done()
            except TerminationNotice:
                self.jobs.task_done()
                break
709534
public int run() {
		try {
			
			if ( compile )
			{
				compile();
			}
			
			
			String separator = "/";
			String cpseperator = ":";
			if (System.getProperty("os.name").contains("indows")){
				separator = "\\";
				cpseperator = ";";
			}
			String s = fileName.replace(separator, ".");
			if ( ".java".equals(s.substring(s.length()-5)))
			{
				s = s.substring(0, s.length()-5); // .java Entfernen
			}
			else
			{
				s = s.substring(0, s.length() - 6); // .class entfernen
			}
			
			
			String localClasspath = classpath;
			if (compileFolder != null)
				localClasspath = localClasspath + cpseperator + compileFolder;
			String command = "java -cp "+localClasspath;
			if (libraryPath != null && libraryPath!= "")
				command += "-Djava.library.path="+libraryPath;
			command = command + " de.kopeme.testrunner.PerformanceTestRunner " + s;
			
//			System.out.println(command);
			Process p = Runtime.getRuntime().exec(command);
			BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
			String line;
			
			BufferedWriter bw = null;
//			System.out.println("ExternalOutputFile: " + externalOutputFile);
			if ( externalOutputFile != null && externalOutputFile != "")
			{
				File output = new File(externalOutputFile);
				try {
					bw = new BufferedWriter( new FileWriter(output));
				} catch (IOException e1) {
					// TODO Automatisch generierter Erfassungsblock
					e1.printStackTrace();
				}
			}
			
			
			while ( (line = br.readLine()) != null )
			{
				if ( bw == null)
				{
					System.out.println(line);
				}
				else
				{
					bw.write(line+"\n");
				}
			}
			
			br = new BufferedReader(new InputStreamReader(p.getErrorStream()));
			while ( (line = br.readLine()) != null )
			{
				if ( bw == null)
				{
					System.out.println(line);
				}
				else
				{
					bw.write(line+"\n");
				}
			}
			if ( bw != null )
				bw.close();
			int returnValue = p.waitFor();
//			System.out.println("Returnvalue: " + returnValue);
			return returnValue;
		} catch (IOException e) {
			// TODO Automatisch generierter Erfassungsblock
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Automatisch generierter Erfassungsblock
			e.printStackTrace();
		}
		return 1;
	}
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;
  }
186027
public function run() {
        # pull the handler from the db
        $handler = $this->getHandler();
        if (!is_object($handler)) {
            $msg = "[JOB] bad handler for job::{$this->job_id}";
            $this->finishWithError($msg);
            return false;
        }

        # run the handler
        try {

            if ($this->fail_on_output) {
                ob_start();                
            }

            $handler->perform();

            if ($this->fail_on_output) {
                $output = ob_get_contents();
                ob_end_clean();

                if (!empty($output)) {
                    throw new Exception("Job produced unexpected output: $output");
                }
            }

            # cleanup
            $this->finish();
            return true;

        } catch (DJRetryException $e) {
            if ($this->fail_on_output) {
                ob_end_flush();
            }
            
            # attempts hasn't been incremented yet.
            $attempts = $this->getAttempts()+1;

            $msg = "Caught DJRetryException \"{$e->getMessage()}\" on attempt $attempts/{$this->max_attempts}.";

            if($attempts == $this->max_attempts) {
                $msg = "[JOB] job::{$this->job_id} $msg Giving up.";
                $this->finishWithError($msg, $handler);
            } else {
                $this->log("[JOB] job::{$this->job_id} $msg Try again in {$e->getDelay()} seconds.", self::WARN);
                $this->retryLater($e->getDelay());
            }
            return false;

        } catch (Exception $e) {
            if ($this->fail_on_output) {
                ob_end_flush();
            }

            $this->finishWithError($e->getMessage(), $handler);
            return false;

        }
    }
161814
public boolean run() {
      ExecutorService executors = Executors.newFixedThreadPool(producers.size() + consumers.size());
      runningProducers.set(producers.size());

      //create the producers
      for (Producer<V> producer : producers) {
         producer.setOwner(this);
         executors.submit(new ProducerThread(producer));
      }

      //create the consumers
      for (java.util.function.Consumer<? super V> consumer : consumers) {
         executors.submit(new ConsumerThread(consumer));
      }

      //give it some more time to process
      while (runningProducers.get() > 0 || !queue.isEmpty()) {
         Threads.sleep(10);
      }

      executors.shutdown();
      try {
         executors.awaitTermination(Integer.MAX_VALUE, TimeUnit.SECONDS);
      } catch (InterruptedException e) {
         logWarn(e);
         return false;
      }
      return true;
   }
170940
public void run() {
		try {
			Object result = execute();
			if (!aborted) {
				this.retval = result;
				finished = true;
			}
		}
		catch (InterruptedException ie) {
			//
		}
		catch (Throwable t) {
			execException = t;
			finished = true;
		}
	}