/* (non-Javadoc)
@see de.chandre.admintool.quartz.AdminToolQuartzService#getJobDescription(org.quartz.JobKey)
320742
@Override
	public String getJobDescription(JobKey jobKey) throws SchedulerException {
		return scheduler.getJobDetail(jobKey).getDescription();
	}
169551
@Override
    public List<OperableTrigger> getTriggersForJob(final JobKey jobKey) throws JobPersistenceException {
        return doWithLock(new LockCallback<List<OperableTrigger>>() {
            @Override
            public List<OperableTrigger> doWithLock(JedisCommands jedis) throws JobPersistenceException {
                return storage.getTriggersForJob(jobKey, jedis);
            }
        }, "Could not retrieve triggers for job.");
    }
360778
@Override
    public com.enioka.jqm.api.JobInstance getJob(int idJob)
    {
        try
        {
            return target.path("ji/" + idJob).request().get(JobInstance.class);
        }
        catch (BadRequestException e)
        {
            throw new JqmInvalidRequestException(e.getResponse().readEntity(String.class), e);
        }
        catch (Exception e)
        {
            throw new JqmClientException("An internal JQM error occured", e);
        }
    }
159771
public JobProfile readJobProfile(JobID jobId) {
    JobProfile jobProfile = null;
    if (active) {
      try {
        FSDataInputStream dataIn = getJobInfoFile(jobId);
        if (dataIn != null) {
          readJobStatus(dataIn);
          jobProfile = readJobProfile(dataIn);
          dataIn.close();
        }
      } catch (IOException ex) {
        LOG.warn("Could not read [" + jobId + "] job profile : " + ex, ex);
      }
    }
    return jobProfile;
  }
1049793
public String getDescription(Locale locale) {

        if (m_systemRole) {
            // localize role names for system roles
            return Messages.get().getBundle(locale).key("GUI_ROLE_DESCRIPTION_" + m_roleName + "_0");
        } else {
            return getName(locale);
        }
    }
816471
private synchronized String getJobNotAdmittedReason(JobInProgress job,
      JobAdmissionWaitInfo waitInfo) {
    JobInfo jobInfo = infos.get(job);
    if (jobInfo == null) {
      return "Unknown, can't find job";
    }
    AdmissionControlData admissionControlData =
        jobInitializer.getAdmissionControlData();
    return NotAdmittedJobInfo.getReasoning(
        adjustClusterwideReason(
            admissionControlData, jobInfo.reason, poolMgr.getPoolName(job)),
            jobInfo.reasonLimit, jobInfo.actualValue,
            jobInfo.hardAdmissionPosition, waitInfo);
  }
220823
public Map<String, Job> getJobs() {
        //FIXME: Check for null of jobs? Can that happen?
        return jobs.stream()
                .map(SET_CLIENT(this.client))
                .collect(Collectors.toMap(k -> k.getName(), Function.identity()));
    }
156293
public JSONObject getJobDetails(String mcUrl, String proxyAddress, String proxyUserName, String proxyPassword){
        if(StringUtils.isBlank(fsUserName) || StringUtils.isBlank(fsPassword.getPlainText())){
            return null;
        }
        return JobConfigurationProxy.getInstance().getJobById(mcUrl, fsUserName, fsPassword.getPlainText(), proxyAddress, proxyUserName, proxyPassword, fsJobId);
    }
1113401
public JobWithDetails getJob(String jobName) throws IOException {
        return getJob(null, UrlUtils.toFullJobPath(jobName));
    }
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;
  }
1285876
@Override
    public JobMeta getJobMeta(String jobType) {
        final Map<String, String> document = map.get(jobType);
        if (document != null) {
            final Map<String, String> meta = document.keySet()
                    .stream()
                    .filter(key -> !key.startsWith("_e_"))
                    .collect(toMap(
                            key -> key,
                            document::get
                    ));
            final boolean isRunning = document.containsKey(KEY_RUNNING);
            final boolean isDisabled = document.containsKey(KEY_DISABLED);
            final String comment = document.get(KEY_DISABLED);
            return new JobMeta(jobType, isRunning, isDisabled, comment, meta);
        } else {
            return new JobMeta(jobType, false, false, "", emptyMap());
        }
    }
572049
private String getJobId(TaskControllerContext context) {
    String taskId = context.task.getTaskID().toString();
    TaskAttemptID tId = TaskAttemptID.forName(taskId);
    String jobId = tId.getJobID().toString();
    return jobId;
  }
548140
public alluxio.grpc.JobInfo getJobInfo() {
    return jobInfo_ == null ? alluxio.grpc.JobInfo.getDefaultInstance() : jobInfo_;
  }
1221101
protected Job postJobWithDescription(JSONObject jobDescription, long notBeforeRealtimeElapsed) {
        String jobId = UUID.randomUUID().toString();
        InternalJob job = new InternalJob(jobId, jobDescription, notBeforeRealtimeElapsed);
        return post(job);
    }
912587
@Override
  public JobStatus getJobStatus(final JobId jobId) {
    final ZooKeeperClient client = provider.get("getJobStatus");

    final Job job = getJob(client, jobId);
    if (job == null) {
      return null;
    }

    final List<String> hosts;
    try {
      hosts = listJobHosts(client, jobId);
    } catch (JobDoesNotExistException e) {
      return null;
    }

    final ImmutableMap.Builder<String, Deployment> deployments = ImmutableMap.builder();
    final ImmutableMap.Builder<String, TaskStatus> taskStatuses = ImmutableMap.builder();
    for (final String host : hosts) {
      final TaskStatus taskStatus = getTaskStatus(client, host, jobId);
      if (taskStatus != null) {
        taskStatuses.put(host, taskStatus);
      }
      final Deployment deployment = getDeployment(host, jobId);
      if (deployment != null) {
        deployments.put(host, deployment);
      }
    }

    final Map<String, Deployment> deploymentsMap = deployments.build();
    return JobStatus.newBuilder()
        .setJob(job)
        .setDeployments(deploymentsMap)
        .setTaskStatuses(taskStatuses.build())
        .build();
  }
269154
public Observable<Job> getJobDetailsAsync(String teamName, String jobId) {
        return getJobDetailsWithServiceResponseAsync(teamName, jobId).map(new Func1<ServiceResponse<Job>, Job>() {
            @Override
            public Job call(ServiceResponse<Job> response) {
                return response.body();
            }
        });
    }
821158
public GetTranscodingJobResponse getTranscodingJob(String jobId) {
        GetTranscodingJobRequest request = new GetTranscodingJobRequest();
        request.setJobId(jobId);
        return getTranscodingJob(request);
    }