Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.Counters


      while(jobIter.hasNext()) {
        Job job = jobIter.next();

        try {
          if (job.isComplete()) {
            Counters ctrs = job.getCounters();
            if (ctrs != null) {
              // If we got counters, perform extra validation.
              this.recentSlotSeconds += ctrs.findCounter(
                  JobInProgress.Counter.SLOTS_MILLIS_MAPS).getValue() / 1000;
             
              long filesSucceeded =
                  ctrs.findCounter(Counter.FILES_SUCCEEDED) != null ?
                    ctrs.findCounter(Counter.FILES_SUCCEEDED).getValue() : 0;
              long filesFailed =
                  ctrs.findCounter(Counter.FILES_FAILED) != null ?
                    ctrs.findCounter(Counter.FILES_FAILED).getValue() : 0;
              long filesNoAction =
                  ctrs.findCounter(Counter.FILES_NOACTION) != null ?
                    ctrs.findCounter(Counter.FILES_NOACTION).getValue() : 0;
              long blockFixSimulationFailed =
                  ctrs.findCounter(Counter.BLOCK_FIX_SIMULATION_FAILED) != null?
                    ctrs.findCounter(Counter.BLOCK_FIX_SIMULATION_FAILED).getValue() : 0;
              long blockFixSimulationSucceeded =
                  ctrs.findCounter(Counter.BLOCK_FIX_SIMULATION_SUCCEEDED) != null?
                    ctrs.findCounter(Counter.BLOCK_FIX_SIMULATION_SUCCEEDED).getValue() : 0;
              this.recentNumBlockFixSimulationFailed += blockFixSimulationFailed;
              this.recentNumBlockFixSimulationSucceeded += blockFixSimulationSucceeded;

              int files = jobIndex.get(job).size();
             
View Full Code Here


  private Reducer<K1, V1, K2, V2> myReducer;
  private Counters counters;

  public ReduceDriver(final Reducer<K1, V1, K2, V2> r) {
    myReducer = r;
    counters = new Counters();
  }
View Full Code Here

    myReducer = r;
    counters = new Counters();
  }

  public ReduceDriver() {
    counters = new Counters();
  }
View Full Code Here

  public MapReduceDriver(final Mapper<K1, V1, K2, V2> m,
                         final Reducer<K2, V2, K3, V3> r) {
    myMapper = m;
    myReducer = r;
    counters = new Counters();
  }
View Full Code Here

    myReducer = r;
    counters = new Counters();
  }

  public MapReduceDriver() {
    counters = new Counters();
  }
View Full Code Here

  private Mapper<K1, V1, K2, V2> myMapper;
  private Counters counters;

  public MapDriver(final Mapper<K1, V1, K2, V2> m) {
    myMapper = m;
    counters = new Counters();
  }
View Full Code Here

    myMapper = m;
    counters = new Counters();
  }

  public MapDriver() {
    counters = new Counters();
  }
View Full Code Here

    createShardDirectories(outDir, 1);

    BlurOutputFormat.setupJob(job, tableDescriptor);

    assertTrue(job.waitForCompletion(true));
    Counters ctrs = job.getCounters();
    System.out.println("Counters: " + ctrs);

    Path path = new Path(tableUri, BlurUtil.getShardName(0));
    Collection<Path> commitedTasks = getCommitedTasks(path);
    assertEquals(1, commitedTasks.size());
View Full Code Here

    BlurOutputFormat.setupJob(job, tableDescriptor);
    BlurOutputFormat.setIndexLocally(job, true);
    BlurOutputFormat.setOptimizeInFlight(job, false);

    assertTrue(job.waitForCompletion(true));
    Counters ctrs = job.getCounters();
    System.out.println("Counters: " + ctrs);

    Path path = new Path(tableUri, BlurUtil.getShardName(0));
    Collection<Path> commitedTasks = getCommitedTasks(path);
    assertEquals(1, commitedTasks.size());
View Full Code Here

    BlurOutputFormat.setupJob(job, tableDescriptor);
    BlurOutputFormat.setIndexLocally(job, false);

    assertTrue(job.waitForCompletion(true));
    Counters ctrs = job.getCounters();
    System.out.println("Counters: " + ctrs);

    long total = 0;
    for (int i = 0; i < tableDescriptor.getShardCount(); i++) {
      Path path = new Path(tableUri, BlurUtil.getShardName(i));
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapreduce.Counters

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.