Returns the raw job history file stored for the given cluster and job ID.
@param jobId the cluster and job ID to look up
@return the stored job history file contents or {@code null} if no
corresponding record was found
@throws IOException
356866
public String getRawJobHistory(QualifiedJobId jobId) throws IOException {
    String historyData = null;
    byte[] rowKey = idConv.toBytes(jobId);
    Get get = new Get(rowKey);
    get.addColumn(Constants.RAW_FAM_BYTES, Constants.JOBHISTORY_COL_BYTES);
    Table rawTable = null;
    try {
      rawTable = hbaseConnection
          .getTable(TableName.valueOf(Constants.HISTORY_RAW_TABLE));
      Result result = rawTable.get(get);
      if (result != null && !result.isEmpty()) {
        historyData = Bytes.toString(result.getValue(Constants.RAW_FAM_BYTES,
            Constants.JOBHISTORY_COL_BYTES));
      }
    } finally {
      if (rawTable != null) {
        rawTable.close();
      }
    }

    return historyData;
  }
1184316
public com.google.protobuf.ByteString
      getJobNameBytes() {
    java.lang.Object ref = jobName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      jobName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
821158
public GetTranscodingJobResponse getTranscodingJob(String jobId) {
        GetTranscodingJobRequest request = new GetTranscodingJobRequest();
        request.setJobId(jobId);
        return getTranscodingJob(request);
    }
21040
def job_file(self):
        
        job_file_name = '%s.job' % (self.name)
        job_file_path = os.path.join(self.initial_dir, job_file_name)
        self._job_file = job_file_path
        return self._job_file
289341
public List<TaskDetails> fetchTaskDetails(String cluster, String jobId,
      List<String> taskResponseFilters) throws IOException {
    String taskFilters = StringUtil.buildParam("include", taskResponseFilters);
    String urlString = String.format("http://%s/api/v1/tasks/%s/%s?%s",
        apiHostname, cluster, jobId, taskFilters);
    return retrieveTaskDetailsFromUrl(urlString);
  }
548140
public alluxio.grpc.JobInfo getJobInfo() {
    return jobInfo_ == null ? alluxio.grpc.JobInfo.getDefaultInstance() : jobInfo_;
  }
152972
public JobFolder createJobFolderWithApplicationId(final String applicationId) throws IOException {
    final Path jobFolderPath = jobSubmissionDirectoryProvider.getJobSubmissionDirectoryPath(applicationId);
    final String finalJobFolderPath = jobFolderPath.toString();
    LOG.log(Level.FINE, "Final job submission Directory: " + finalJobFolderPath);
    return createJobFolder(finalJobFolderPath);
  }
395476
public static JobHistoryFileParser createJobHistoryFileParser(
      byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException {

    if (historyFileContents == null) {
      throw new IllegalArgumentException(
          "Job history contents should not be null");
    }

    HadoopVersion version = getVersion(historyFileContents);

    switch (version) {
    case TWO:
      return new JobHistoryFileParserHadoop2(jobConf);

    default:
      throw new IllegalArgumentException(
          " Unknown format of job history file ");
    }
  }
1113401
public JobWithDetails getJob(String jobName) throws IOException {
        return getJob(null, UrlUtils.toFullJobPath(jobName));
    }
736164
public Path getInputFile(int mapId, TaskAttemptID reduceTaskId)
    throws IOException {
    // TODO *oom* should use a format here
    return lDirAlloc.getLocalPathToRead(TaskTracker.getIntermediateOutputDir(
                       jobId.toString(), reduceTaskId.toString())
                       + "/map_" + mapId + ".out",
                       conf);
  }
1340369
@Override
  public Job getJob(final JobId id) {
    log.debug("getting job: {}", id);
    final ZooKeeperClient client = provider.get("getJobId");
    return getJob(client, id);
  }
1357721
@Override
  public JobDetail retrieveJob(String jobKey) {

    synchronized (lock) {
      JobWrapper jw = jobsByKey.get(jobKey);
      return (jw != null) ? (JobDetail) jw.jobDetail.clone() : null;
    }
  }
910613
@Override
	public void setJobRunning(JobID jobID) throws IOException {
		checkNotNull(jobID, "jobID");
		final Path filePath = createMarkerFilePath(RUNNING_PREFIX, jobID);

		// create the file
		// to avoid an exception if the job already exists, set overwrite=true
		createFile(filePath, true);
	}
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;
	}
905043
def get_logs(self, jobs, log_file=None):
        """"""
        if not (jobs and self.log_url):
            return

        for job in jobs:
            url = "{}?jobId={}".format(self.log_url, job.get("id"))
            if log_file:
                self._download_log("{}&download".format(url), log_file)
            else:
                logger.info("Submit log for job %s: %s", job.get("id"), url)
1058028
public void markJobForReprocesssing(QualifiedJobId jobId) throws IOException {
    Put p = new Put(idConv.toBytes(jobId));
    p.addColumn(Constants.INFO_FAM_BYTES, Constants.RAW_COL_REPROCESS_BYTES,
        Bytes.toBytes(true));
    Table rawTable = null;
    try {
      rawTable = hbaseConnection
          .getTable(TableName.valueOf(Constants.HISTORY_RAW_TABLE));
      rawTable.put(p);
    } finally {
      if (rawTable != null) {
        rawTable.close();
      }
    }
  }
807963
public Counters readCounters(JobID jobId) {
    Counters counters = null;
    if (active) {
      try {
        FSDataInputStream dataIn = getJobInfoFile(jobId);
        if (dataIn != null) {
          readJobStatus(dataIn);
          readJobProfile(dataIn);
          counters = readCounters(dataIn);
          dataIn.close();
        }
      } catch (IOException ex) {
        LOG.warn("Could not read [" + jobId + "] job counters : " + ex, ex);
      }
    }
    return counters;
  }