Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.JobID


public class IDConverter {

  // FIXME hardcoded assumption that one app is one dag
  public static JobID toMRJobId(TezDAGID dagId) {
    return new JobID(
        Long.toString(dagId.getApplicationId().getClusterTimestamp()),
        dagId.getApplicationId().getId());
  }
View Full Code Here


            new HashSet<JobID>(runningJobs.keySet());

        JobStatus[] jstatus = client.jobsToComplete();
        for (JobStatus status : jstatus) {

          JobID jobId = status.getJobID();
          missingJobIds.remove(jobId);

          HadoopJob hJob;
          synchronized (HadoopServer.this.runningJobs) {
            hJob = runningJobs.get(jobId);
View Full Code Here

    @Override
    protected void processKill(String jobid) throws IOException
    {
        if (mJobConf != null) {
            JobClient jc = new JobClient(mJobConf);
            JobID id = JobID.forName(jobid);
            RunningJob job = jc.getJob(id);
            if (job == null)
                System.out.println("Job with id " + jobid + " is not active");
            else
            {   
View Full Code Here

            LOG.warn("unable to get MR oper for job: " + job.toString());
            return null;
        }
        JobStats js = mroJobMap.get(mro);
       
        JobID jobId = job.getAssignedJobID();
        js.setId(jobId);
        js.setAlias(mro);
        js.setConf(job.getJobConf());
        return js;
    }
View Full Code Here

    }
   
    @SuppressWarnings("deprecation")
    public JobStats addJobStatsForNative(NativeMapReduceOper mr) {
        JobStats js = mroJobMap.get(mr);
        js.setId(new JobID(mr.getJobId(), NativeMapReduceOper.getJobNumber()));
        js.setAlias(mr);
       
        return js;
    }
View Full Code Here

    }

    public String getTaskLevelCountersByJobId(String jobTracker, String jobId) throws IOException {
        StringBuilder taskCounters = new StringBuilder();

        JobID id = this.convertToJobId(jobId);
        JobClient client = this.prepareJobClient(jobTracker);
        RunningJob job = client.getJob(id);
        TaskReport[] mapTaskReports = client.getMapTaskReports(id);
        TaskReport[] reduceTaskReports = client.getReduceTaskReports(id);
View Full Code Here

    public String getTaskStatisticsByJobId(String jobTracker, String jobId) throws IOException {
        StringBuilder taskStatistics = new StringBuilder();
        long taskDuration;
        String duration;

        JobID id = this.convertToJobId(jobId);
        JobClient client = this.prepareJobClient(jobTracker);
        RunningJob job = client.getJob(id);

        TaskReport[] mapTaskReports = client.getMapTaskReports(id);
        TaskReport[] reduceTaskReports = client.getReduceTaskReports(id);
View Full Code Here

        return client;
    }

    protected JobID convertToJobId(String jobId) {
        String id = jobId.replace("job_", "");
        return new JobID(id.split("_")[0], Integer.valueOf(id.split("_")[1]));
    }
View Full Code Here

    }

    private Map<String, String> getJobCounters(String jobTracker, String jobId) throws IOException {
        JobClient client = prepareJobClient(jobTracker);

        JobID id = this.convertToJobId(jobId);

        Map<String, String> counters = new HashMap<String, String>();

        RunningJob job = client.getJob(id);
        Counters counter = job.getCounters();
View Full Code Here

    public String getJobStatisticsByJobId(String jobTracker, String jobId) throws IOException {
        StringBuilder jobStatistics = new StringBuilder();

        JobClient client = prepareJobClient(jobTracker);
        JobID id = convertToJobId(jobId);

        RunningJob job = client.getJob(id);

        double mapProgress = job.mapProgress() * 100;
        double reduceProgress = job.reduceProgress() * 100;
 
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.JobID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.