Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.JobID


    @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


    }
       
    @SuppressWarnings("deprecation")
    JobStats addJobStats(Job job) {
        MapReduceOper mro = null;
        JobID jobId = job.getAssignedJobID();
        if (jobId != null) {
            mro = jobMroMap.get(jobId.toString());
        } else {
            mro = jobMroMap.get(job.toString());
        }
        if (mro == null) {
            LOG.warn("unable to get MR oper for job: "
                    + ((jobId == null) ? job.toString() : jobId.toString()));
            return null;
        }
        JobStats js = mroJobMap.get(mro);
       
        js.setAlias(mro);
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

        } else {
            JobStats js = mroJobMap.get(mro);
            if (js == null) {
                LOG.warn("null job stats for mro: " + mro.getOperatorKey());
            } else {
                JobID id = job.getAssignedJobID();
                js.setId(id);   
                if (id != null) {
                    jobMroMap.put(id.toString(), mro);
                } else {
                    jobMroMap.put(job.toString(), mro);
                }
            }
        }
View Full Code Here

        }
    }
   
    @SuppressWarnings("deprecation")
    void computeWarningAggregate(Job job, JobClient jobClient, Map<Enum, Long> aggMap) {
        JobID mapRedJobID = job.getAssignedJobID();
        RunningJob runningJob = null;
        try {
            runningJob = jobClient.getJob(mapRedJobID);
            if(runningJob != null) {
                Counters counters = runningJob.getCounters();
View Full Code Here

    protected boolean isComplete(double prog){
        return (int)(Math.ceil(prog)) == 1;
    }
   
    protected void getStats(Job job, JobClient jobClient, boolean errNotDbg, PigContext pigContext) throws Exception {
        JobID MRJobID = job.getAssignedJobID();
        String jobMessage = job.getMessage();
        Exception backendException = null;
        if(MRJobID == null) {
            try {
                LogUtils.writeLog("Backend error message during job submission", jobMessage,
View Full Code Here

     * @param jobClient - the JobClient to which it has been submitted
     * @return Returns the percentage progress of this Job
     * @throws IOException
     */
    protected double progressOfRunningJob(Job j, JobClient jobClient) throws IOException{
        JobID mrJobID = j.getAssignedJobID();
        RunningJob rj = jobClient.getJob(mrJobID);
        if(rj==null && j.getState()==Job.SUCCESS)
            return 1;
        else if(rj==null)
            return 0;
View Full Code Here

    protected boolean isComplete(double prog){
        return (int)(Math.ceil(prog)) == 1;
    }
   
    protected void getStats(Job job, JobClient jobClient, boolean errNotDbg, PigContext pigContext) throws Exception {
        JobID MRJobID = job.getAssignedJobID();
        String jobMessage = job.getMessage();
        Exception backendException = null;
        if(MRJobID == null) {
            try {
                LogUtils.writeLog("Backend error message during job submission", jobMessage,
View Full Code Here

     * @param jobClient - the JobClient to which it has been submitted
     * @return Returns the percentage progress of this Job
     * @throws IOException
     */
    protected double progressOfRunningJob(Job j, JobClient jobClient) throws IOException{
        JobID mrJobID = j.getAssignedJobID();
        RunningJob rj = jobClient.getJob(mrJobID);
        if(rj==null && j.getState()==Job.SUCCESS)
            return 1;
        else if(rj==null)
            return 0;
View Full Code Here

            }
        }
    }
   
    void computeWarningAggregate(Job job, JobClient jobClient, Map<Enum, Long> aggMap) {
        JobID mapRedJobID = job.getAssignedJobID();
        RunningJob runningJob = null;
        try {
            runningJob = jobClient.getJob(mapRedJobID);
            if(runningJob != null) {
                Counters counters = runningJob.getCounters();
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.