Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.CounterGroup.findCounter()


    Counters c = new Counters();
    Map<String, Map<String, Long>> values = counters.value();
    for (Map.Entry<String, Map<String, Long>> e : values.entrySet()) {
      CounterGroup cg = c.getGroup(e.getKey());
      for (Map.Entry<String, Long> f : e.getValue().entrySet()) {
        cg.findCounter(f.getKey()).setValue(f.getValue());
      }
    }
    return c;
  }
View Full Code Here


  private Counters getCounters() {
    Counters c = new Counters();
    for (Map.Entry<String, Map<String, Long>> e : counters.value().entrySet()) {
      CounterGroup cg = c.getGroup(e.getKey());
      for (Map.Entry<String, Long> f : e.getValue().entrySet()) {
        cg.findCounter(f.getKey()).setValue(f.getValue());
      }
    }
    return c;
  }
View Full Code Here

       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());

      out.write("\n       <tr>\n");
View Full Code Here

  private Counters getCounters() {
    Counters c = new Counters();
    for (Map.Entry<String, Map<String, Long>> e : counters.value().entrySet()) {
      CounterGroup cg = c.getGroup(e.getKey());
      for (Map.Entry<String, Long> f : e.getValue().entrySet()) {
        cg.findCounter(f.getKey()).setValue(f.getValue());
      }
    }
    return c;
  }
View Full Code Here

                  counter.getName()), counter.getDisplayName()).
            _();
          }
        if (map != null) {
          Counter mc = mg == null ? null : mg.findCounter(counter.getName());
          Counter rc = rg == null ? null : rg.findCounter(counter.getName());
          groupRow.
            td(mc == null ? "0" : String.valueOf(mc.getValue())).
            td(rc == null ? "0" : String.valueOf(rc.getValue()));
        }
        groupRow.td(String.valueOf(counter.getValue()))._();
View Full Code Here

           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

                  counter.getName()), counter.getDisplayName()).
            _();
          }
        if (map != null) {
          Counter mc = mg == null ? null : mg.findCounter(counter.getName());
          Counter rc = rg == null ? null : rg.findCounter(counter.getName());
          groupRow.
            td(mc == null ? "0" : String.valueOf(mc.getValue())).
            td(rc == null ? "0" : String.valueOf(rc.getValue()));
        }
        groupRow.td(String.valueOf(counter.getValue()))._();
View Full Code Here

        long value = 0;
        Counters counters = entry.getValue().getCounters();
        CounterGroup group = (counters != null) ? counters
          .getGroup($(COUNTER_GROUP)) : null;
        if(group != null)  {
          Counter c = group.findCounter($(COUNTER_NAME));
          if(c != null) {
            value = c.getValue();
          }
        }
        values.put(MRApps.toString(entry.getKey()), value);
View Full Code Here

      long value = 0;
      Counters counters = entry.getValue().getCounters();
      CounterGroup group = (counters != null) ? counters
        .getGroup($(COUNTER_GROUP)) : null;
      if(group != null)  {
        Counter c = group.findCounter($(COUNTER_NAME));
        if(c != null) {
          value = c.getValue();
        }
      }
      values.put(MRApps.toString(entry.getKey()), value);
View Full Code Here

      // Counters,
      // then we get the CounterGroup, then we get the Counter, then we
      // get the count.
      Counters counters = mrState.getCounters();
      CounterGroup counterGroup = counters.getGroup("CommentWords");
      Counter counter = counterGroup.findCounter("count");
      long wordCount = counter.getValue(); // Finally!

      // Let's create a special datastore Entity for this value so
      // we can reference it on the ViewComments page
      Entity totalCountEntity = new Entity("TotalWordCount",
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.