Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.RunningJob.reduceProgress()


            return 1;
        else if(rj==null)
            return 0;
        else{
            double mapProg = rj.mapProgress();
            double redProg = rj.reduceProgress();
            return (mapProg + redProg)/2;
        }
    }
    public long getTotalHadoopTimeSpent() {
        return totalHadoopTimeSpent;
View Full Code Here


            return 1;
        else if(rj==null)
            return 0;
        else{
            double mapProg = rj.mapProgress();
            double redProg = rj.reduceProgress();
            return (mapProg + redProg)/2;
        }
    }
    public long getTotalHadoopTimeSpent() {
        return totalHadoopTimeSpent;
View Full Code Here

                        break;
                    }
                    else // still running
                    {
                        double mapProgress = status.mapProgress();
                        double reduceProgress = status.reduceProgress();
                        if (lastMapProgress != mapProgress || lastReduceProgress != reduceProgress) {
                            if (log.isDebugEnabled()) {
                                StringBuilder sbProgress = new StringBuilder();
                                sbProgress.append("Hadoop job progress: Map=");
                                sbProgress.append((int) (mapProgress * 100));
 
View Full Code Here

            js.setJobName(rj.getJobName());
            js.setTrackingUrl(rj.getTrackingURL());
            js.setIsComplete(rj.isComplete());
            js.setIsSuccessful(rj.isSuccessful());
            js.setMapProgress(rj.mapProgress());
            js.setReduceProgress(rj.reduceProgress());
            js.setTotalMappers((int)counters.findCounter(JobInProgress.Counter.TOTAL_LAUNCHED_MAPS).getCounter());
            js.setTotalReducers((int)counters.findCounter(JobInProgress.Counter.TOTAL_LAUNCHED_REDUCES).getCounter());
            return js;
        } catch (IOException e) {
            LOG.error("Error getting job info.", e);
View Full Code Here

      if(runningJob == null) {
        // Return default value
        return super.progress(submissionId);
      }

      return (runningJob.mapProgress() + runningJob.reduceProgress()) / 2;
    } catch (IOException e) {
      throw new SqoopException(MapreduceSubmissionError.MAPREDUCE_0003, e);
    }
  }
View Full Code Here

  @Override
  public void updateCounters(TaskHandle t) throws IOException {
    ExecDriverTaskHandle th = (ExecDriverTaskHandle)t;
    RunningJob rj = th.getRunningJob();
    this.mapProgress = Math.round(rj.mapProgress() * 100);
    this.reduceProgress = Math.round(rj.reduceProgress() * 100);
    taskCounters.put("CNTR_NAME_" + getId() + "_MAP_PROGRESS", Long.valueOf(this.mapProgress));
    taskCounters.put("CNTR_NAME_" + getId() + "_REDUCE_PROGRESS", Long.valueOf(this.reduceProgress));
    Counters ctrs = th.getCounters();
    for (Operator<? extends Serializable> op: work.getAliasToWork().values()) {
      op.updateCounters(ctrs);
View Full Code Here

            return 1;
        else if(rj==null)
            return 0;
        else{
            double mapProg = rj.mapProgress();
            double redProg = rj.reduceProgress();
            return (mapProg + redProg)/2;
        }
    }
    public long getTotalHadoopTimeSpent() {
        return totalHadoopTimeSpent;
View Full Code Here

      if(runningJob == null) {
        // Return default value
        return super.progress(submissionId);
      }

      return (runningJob.mapProgress() + runningJob.reduceProgress()) / 2;
    } catch (IOException e) {
      throw new SqoopException(MapreduceSubmissionError.MAPREDUCE_0003, e);
    }
  }
View Full Code Here

            return 1;
        else if(rj==null)
            return 0;
        else{
            double mapProg = rj.mapProgress();
            double redProg = rj.reduceProgress();
            return (mapProg + redProg)/2;
        }
    }
    public long getTotalHadoopTimeSpent() {
        return totalHadoopTimeSpent;
View Full Code Here

        if (rj == null && j.getState() == Job.SUCCESS)
            return 1;
        else if (rj == null)
            return 0;
        else {
            return (rj.mapProgress() + rj.reduceProgress()) / 2;
        }
    }

    public static void killJob(Job job) throws IOException {
        RunningJob runningJob = job.getJobClient().getJob(job.getAssignedJobID());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.