Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.CounterGroup


        "Reduce Value",
        "Total Value"));
    buff.append("\n------------------------------------------"+
        "---------------------------------------------");
    for (String groupName : totalCounters.getGroupNames()) {
         CounterGroup totalGroup = totalCounters.getGroup(groupName);
         CounterGroup mapGroup = mapCounters.getGroup(groupName);
         CounterGroup reduceGroup = reduceCounters.getGroup(groupName);
     
         Format decimal = new DecimalFormat();
         Iterator<org.apache.hadoop.mapreduce.Counter> ctrItr =
           totalGroup.iterator();
         while(ctrItr.hasNext()) {
           org.apache.hadoop.mapreduce.Counter counter = ctrItr.next();
           String name = counter.getName();
           String mapValue =
             decimal.format(mapGroup.findCounter(name).getValue());
           String reduceValue =
             decimal.format(reduceGroup.findCounter(name).getValue());
           String totalValue =
             decimal.format(counter.getValue());

           buff.append(
               String.format("%n|%1$-30s|%2$-30s|%3$-10s|%4$-10s|%5$-10s",
View Full Code Here


    job.waitForCompletion(true);

    // dump all counters
    Counters counters = job.getCounters();
    for (String groupName : counters.getGroupNames()) {
      CounterGroup group = counters.getGroup(groupName);
      log.info("Group: " + group.getDisplayName());
      for (Counter counter : group) {
        log.info(counter.getDisplayName() + ":\t" + counter.getValue());
      }
    }
View Full Code Here

    sb.append("\nTask wait time (seconds):\n");
    sb.append(String.format("    %12s %6.1f\n", "min", min));
    sb.append(String.format("    %12s %6.1f\n", "mean", mean));
    sb.append(String.format("    %12s %6.1f\n", "max", max));

    CounterGroup totalGrp = job.getCounters().getGroup("total");

    long decode = totalGrp.findCounter("decode-time(ms)").getValue();
    long request = totalGrp.findCounter("request-time(ms)").getValue();
    long map = totalGrp.findCounter("mapper-time(ms)").getValue();
    long mb = totalGrp.findCounter("data-read").getValue();

    long other = totalTaskTime - map - request - decode;

    sb.append("\nHadoop task breakdown:\n");
    sb.append(String.format("    %12s %s\n", "kafka", NumberFormat
View Full Code Here

                this.recentNumBlockFixSimulationSucceeded.addAndGet(blockFixSimulationSucceeded);
                long fileFixNumReadBytesRemoteRack =
                    ctrs.findCounter(RaidCounter.FILE_FIX_NUM_READBYTES_REMOTERACK) != null ?
                      ctrs.findCounter(RaidCounter.FILE_FIX_NUM_READBYTES_REMOTERACK).getValue() : 0;
                this.recentNumReadBytesRemoteRack.addAndGet(fileFixNumReadBytesRemoteRack);
                CounterGroup counterGroup = ctrs.getGroup(LogUtils.LOG_COUNTER_GROUP_NAME);
                for (Counter ctr: counterGroup) {
                  Long curVal = ctr.getValue();
                  if (this.recentLogMetrics.containsKey(ctr.getName())) {
                    curVal += this.recentLogMetrics.get(ctr.getName());
                  }
View Full Code Here

TOP

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

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.