Queries the GenePattern server for child jobs of this job, creates GPJob
        objects representing each of them and assigns the list of them to the
        GPJob.children property. Then return this list.
426717
def get_child_jobs(self):
        
        # Lazily load info
        if self.info is None:
            self.get_info()

        # Lazily load children
        if self.children is not None:
            return self.children
        else:
            if 'children' in self.info:
                child_list = []
                for child in self.info['children']['items']:
                    child_job = GPJob(self.server_data, child['jobId'])
                    child_job.info = child
                    child_job.load_info()
                    child_list.append(child_job)
                return child_list
            else:               # No children? Return empty list
                return []
318910
def job(self, name):
        
        for job in self.jobs():
            if job.data.name == name:
                return job
578362
@SuppressWarnings("unused") // called through reflection by RequestServer
  public JobsV3 list(int version, JobsV3 s) {
    Job[] jobs = Job.jobs();
    // Jobs j = new Jobs();
    // j._jobs = Job.jobs();
    // PojoUtils.copyProperties(s, j, PojoUtils.FieldNaming.ORIGIN_HAS_UNDERSCORES);
    s.jobs = new JobV3[jobs.length];

    int i = 0;
    for (Job j : jobs) {
      try { s.jobs[i] = (JobV3) SchemaServer.schema(version, j).fillFromImpl(j); }
      // no special schema for this job subclass, so fall back to JobV3
      catch (H2ONotFoundArgumentException e) { s.jobs[i] = new JobV3().fillFromImpl(j); }
      i++; // Java does the increment before the function call which throws?!
    }
    return s;
  }
370049
def jobs(self):
        
        jobs = list()
        for data in self.data.jobs:
            jobs.append(JobInstance(session=self._session, data=data, stage=self))

        return jobs
1248799
def spawn_batch_jobs(job, shared_ids, input_args):
    
    samples = []
    config = input_args['config']
    with open(config, 'r') as f_in:
        for line in f_in:
            line = line.strip().split(',')
            uuid = line[0]
            urls = line[1:]
            samples.append((uuid, urls))
    for sample in samples:
        job.addChildJobFn(alignment, shared_ids, input_args, sample, cores=32, memory='20 G', disk='100 G')
198620
def setup(job, input_file_id, n, down_checkpoints):
    
    # Write the input file to the file store
    job.fileStore.logToMaster("Starting the merge sort")
    return job.addChildJobFn(down,
                             input_file_id, n,
                             down_checkpoints=down_checkpoints,
                             memory='600M').rv()
414879
def jobs(self):
        
        if self._jobs is None:
            self._jobs = JobTable(self.connection, self.database)
        return self._jobs
1364064
def submit_jobs(job_specs):
    
    gk = get_api_client()
    jobs = []
    try:
        for site, job_spec in job_specs:
            logger.info("Submitting %s on %s" % (job_spec, site))
            jobs.append(gk.sites[site].jobs.create(job_spec))
    except Exception as e:
        logger.error("An error occured during the job submissions")
        logger.error("Cleaning the jobs created")
        for job in jobs:
            job.delete()
        raise(e)

    return jobs
998915
def make_job_spec(self):
        
        # If the parameters haven't been loaded yet, do so
        if not self._params_loaded and self.server_data is not None:
            self.param_load()

        return GPJobSpec(self.server_data, self.lsid)
342610
def _get_jobs_from_template(self, template, job_class):
        
        jobs = []
        for command in template.eval():
            alias = command.alias
            depends_on = [job.alias
                for job in self.queue.all_jobs
                    for deps in command.depends_on
                        if deps == job.alias]
            command.update_dependent_files([job.command
                for job in self.queue.all_jobs
                    if not isinstance(job, JobTemplate)])

            job = job_class(alias, command, depends_on)
            jobs.append(job)
        return jobs
1051543
def addChild(self, childJob):
        
        self._children.append(childJob)
        childJob._addPredecessor(self)
        return childJob
81965
def printAggregateJobStats(self, properties, childNumber):
        """"""
        for job in self.jobsToReport:
            lf = lambda x: "%s:%s" % (x, str(x in properties))
            print("\t".join(("JOB:%s" % job,
                             "LOG_FILE:%s" % job.logJobStoreFileID,
                             "TRYS_REMAINING:%i" % job.remainingRetryCount,
                             "CHILD_NUMBER:%s" % childNumber,
                             lf("READY_TO_RUN"), lf("IS_ZOMBIE"),
                             lf("HAS_SERVICES"), lf("IS_SERVICE"))))
1148323
def assign_job_record(self, tree_node):
        
        try:
            job_record = self.job_dao.get_one(tree_node.process_name, tree_node.timeperiod)
        except LookupError:
            state_machine_name = context.process_context[tree_node.process_name].state_machine_name
            state_machine = self.state_machines[state_machine_name]
            job_record = state_machine.create_job(tree_node.process_name, tree_node.timeperiod)
        tree_node.job_record = job_record
1303361
@SuppressWarnings("unchecked")
    public static <K1, V1, K2, V2> Class<BaseMapper<K1, V1, K2, V2>> getMapperClass(
        JobContext job) {
    	Configuration conf = job.getConfiguration();
        return (Class<BaseMapper<K1, V1, K2, V2>>)conf.getClass(
        		ConfigConstants.CONF_MULTITHREADEDMAPPER_CLASS, BaseMapper.class);
    }
487182
private function createChild(JobConfig $config, array $parentResults) : array
    {
        // Clone and reset Scroller
        $scroller = clone $this->scroller;
        $scroller->reset();

        $params = [];
        $placeholders = !empty($config->getConfig()['placeholders']) ? $config->getConfig()['placeholders'] : [];
        if (empty($placeholders)) {
            $this->logger->warning("No 'placeholders' set for '" . $config->getConfig()['endpoint'] . "'");
        }

        foreach ($placeholders as $placeholder => $field) {
            $params[$placeholder] = $this->getPlaceholder($placeholder, $field, $parentResults);
        }

        // Add parent params as well (for 'tagging' child-parent data)
        // Same placeholder in deeper nesting replaces parent value
        if (!empty($this->parentParams)) {
            $params = array_replace($this->parentParams, $params);
        }
        $params = $this->flattenParameters($params);

        $jobs = [];
        foreach ($params as $index => $param) {
            // Clone the config to prevent overwriting the placeholder(s) in endpoint
            $job = new static(
                clone $config,
                $this->client,
                $this->parser,
                $this->logger,
                $scroller,
                $this->attributes,
                $this->metadata,
                $this->compatLevel
            );
            $job->setParams($param);
            $job->setParentResults($parentResults);
            $jobs[] = $job;
        }
        return $jobs;
    }
1148130
public void generateJobTable(JspWriter out, String label, List<JobInProgress> jobs)
      throws IOException {
    if (jobs.size() > 0) {
      for (JobInProgress job : jobs) {
        JobProfile profile = job.getProfile();
        JobStatus status = job.getStatus();
        JobID jobid = profile.getJobID();

        int desiredMaps = job.desiredMaps();
        int desiredReduces = job.desiredReduces();
        int completedMaps = job.finishedMaps();
        int completedReduces = job.finishedReduces();
        String name = profile.getJobName();

        out.print("<" + label + "_job jobid=\"" + jobid + "\">\n");
        out.print("  <jobid>" + jobid + "</jobid>\n");
        out.print("  <user>" + profile.getUser() + "</user>\n");
        out.print("  <name>" + ("".equals(name) ? "&nbsp;" : name) + "</name>\n");
        out.print("  <map_complete>" + StringUtils.formatPercent(status.mapProgress(), 2) + "</map_complete>\n");
        out.print("  <map_total>" + desiredMaps + "</map_total>\n");
        out.print("  <maps_completed>" + completedMaps + "</maps_completed>\n");
        out.print("  <reduce_complete>" + StringUtils.formatPercent(status.reduceProgress(), 2) + "</reduce_complete>\n");
        out.print("  <reduce_total>" + desiredReduces + "</reduce_total>\n");
        out.print("  <reduces_completed>" + completedReduces + "</reduces_completed>\n");
        out.print("</" + label + "_job>\n");
      }
    }
  }
305753
public static <J extends Job<J,R>, R extends Run<J,R>> RunList<R> fromJobs(Iterable<? extends J> jobs) {
        List<Iterable<R>> runLists = new ArrayList<>();
        for (Job j : jobs)
            runLists.add(j.getBuilds());
        return new RunList<>(combine(runLists));
    }