Get the job id from the configuration
976522
public static String getJobID(Configuration conf) {
    String jobId = conf.get("mapred.job.id", null);
    if (jobId == null) {
      jobId = "localRaid" + df.format(new Date());
      conf.set("mapred.job.id", jobId);
    }
    return jobId;
  }
272784
def get_details(self, jobname, jobkey):
        """"""
        fullkey = JobDetails.make_fullkey(jobname, jobkey)
        return self._cache[fullkey]
915162
def info(job_name_or_id):
    
    try:
        experiment = ExperimentClient().get(normalize_job_name(job_name_or_id))
    except FloydException:
        experiment = ExperimentClient().get(job_name_or_id)

    task_instance_id = get_module_task_instance_id(experiment.task_instances)
    task_instance = TaskInstanceClient().get(task_instance_id) if task_instance_id else None
    normalized_job_name = normalize_job_name(experiment.name)
    table = [["Job name", normalized_job_name],
             ["Created", experiment.created_pretty],
             ["Status", experiment.state], ["Duration(s)", experiment.duration_rounded],
             ["Instance", experiment.instance_type_trimmed],
             ["Description", experiment.description],
             ["Metrics", format_metrics(experiment.latest_metrics)]]
    if task_instance and task_instance.mode in ['jupyter', 'serving']:
        table.append(["Mode", task_instance.mode])
        table.append(["Url", experiment.service_url])
    if experiment.tensorboard_url:
        table.append(["TensorBoard", experiment.tensorboard_url])
    floyd_logger.info(tabulate(table))
646930
private static String getJobName(JobExecutionPlan jobExecutionPlan) {
    return jobExecutionPlan.getJobSpec().getConfig().getString(ConfigurationKeys.JOB_NAME_KEY);
  }
171985
def job_data(cls, job_id=dummy_job_id, branches=None, **kwargs):
        
        return dict(job_id=job_id, branches=branches or [])
1312606
def _build_job_dict(self):
        """"""
        if self.args['dry_run']:
            status = JobStatus.unknown
        else:
            status = JobStatus.not_ready

        base_config = self.scatter_link.args

        for jobkey, job_config in sorted(self._job_configs.items()):
            full_job_config = base_config.copy()
            full_job_config.update(job_config)
            ScatterGather._make_scatter_logfile_name(jobkey,
                                                     self.linkname, full_job_config)
            logfile = job_config.get('logfile')
            self._scatter_link._register_job(key=jobkey,
                                             job_config=full_job_config,
                                             logfile=logfile,
                                             status=status)
148088
def delete(self):
        " "

        response = self.dyn.delete(self.url)
        return response.content['job_id']
388637
def get_logs(self, job_id):
        """"""
        response, http_response = self._client.jobs.get_logs(job_id=job_id).\
            result()
        if http_response.status_code == 404:
            raise HTTPNotFound('The given job ID was not found. Error: {}'.
                               format(http_response.data))
        return http_response.text
1067097
def job_data(cls, job_id=dummy_job_id, status=None, code=None, error=None, **kwargs):
        
        return dict(job_id=job_id, status=status, code=code, error=error)
600738
def get_task_id(self):
        """"""
        task_id = self.json_response.get("task_id", None)
        self.logger.info("%s\t%s" % (self.request_method, self.request_url))
        return task_id
1151838
private List<Properties> loadGeneralJobConfigs()
      throws ConfigurationException, IOException {
    List<Properties> jobConfigs = SchedulerUtils.loadGenericJobConfigs(this.properties);
    LOG.info(String.format("Loaded %d job configurations", jobConfigs.size()));
    return jobConfigs;
  }
640884
private List<String> getIds(ConfigurationAdmin ca, String[] pids) {
        final String methodName = "getIds(): ";
        if (pids == null) {
            return Collections.emptyList();
        }
        List<String> ids = new ArrayList<String>();
        for (String pid : pids) {
            try {
                String filter = "(" + org.osgi.framework.Constants.SERVICE_PID + "=" + pid + ")";
                Configuration[] config = ca.listConfigurations(filter);
                if (config == null) {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, methodName + "Configuration not found for pid " + pid);
                } else {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, methodName + "Found config for " + pid);
                    String id = (String) config[0].getProperties().get("id");
                    ids.add(id);
                }
            } catch (IOException e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + "Configuration not found for " + pid, e);
            } catch (InvalidSyntaxException e) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + "Configuration not found for " + pid, e);
            }
        }
        return Collections.unmodifiableList(ids);
    }
1238763
def get_driver(configuration):
    
    resources = configuration["resources"]
    machines = resources["machines"]
    networks = resources["networks"]
    oargrid_jobids = configuration.get("oargrid_jobids")

    if oargrid_jobids:
        logger.debug("Loading the OargridStaticDriver")
        return OargridStaticDriver(oargrid_jobids)
    else:
        job_name = configuration.get("job_name", DEFAULT_JOB_NAME)
        walltime = configuration.get("walltime", DEFAULT_WALLTIME)
        job_type = configuration.get("job_type", JOB_TYPE_DEPLOY)
        reservation_date = configuration.get("reservation", False)
        # NOTE(msimonin): some time ago asimonet proposes to auto-detect
        # the queues and it was quiet convenient
        # see https://github.com/BeyondTheClouds/enos/pull/62
        queue = configuration.get("queue", None)
        logger.debug("Loading the OargridDynamicDriver")

        return OargridDynamicDriver(
            job_name,
            walltime,
            job_type,
            reservation_date,
            queue,
            machines,
            networks
        )
607836
def setup_job(manager, job_id, tool_id, tool_version, use_metadata=False):
    
    job_id = manager.setup_job(job_id, tool_id, tool_version)
    if use_metadata:
        manager.enable_metadata_directory(job_id)
    return build_job_config(
        job_id=job_id,
        job_directory=manager.job_directory(job_id),
        system_properties=manager.system_properties(),
        tool_id=tool_id,
        tool_version=tool_version
    )
1192741
def submit_job(self, job_config=None):
        
        job_id = self._delegator._submit_bundle(self, job_config)
        return self._instance.get_job(job_id)
452576
def get_job_logs_from_workflow(workflow_id):
    """"""
    query_result = (
        db.session.query(
            models.CrawlerJob.logs,
        )
        .join(
            models.CrawlerWorkflowObject,
            models.CrawlerJob.job_id == models.CrawlerWorkflowObject.job_id,
        )
        .filter(models.CrawlerWorkflowObject.object_id == workflow_id)
        .one_or_none()
    )

    if query_result is None:
        click.secho(
            (
                "Workflow %s was not found, maybe it's not a crawl workflow?" %
                workflow_id
            ),
            fg='yellow',
        )
        sys.exit(1)

    _show_file(
        file_path=query_result[0],
        header_name='Log',
    )
1085997
def get_job_model(self):
        
        if not self.job:
            raise Exception('Job not loaded yet. Use load(id) first.')

        return JobModel(self.job_id, self.job, self.home_config['storage_dir'])