Package org.apache.hadoop.mapreduce

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


    job.submit();
   
    int retVal = job.waitForCompletion(true)?0:1;
   
    CounterGroup counters          = job.getCounters().getGroup(CollectionMapper.RESOLVER_GROUP);   
    Counter constructMessageMS     = counters.findCounter(CollectionMapper.CONSTRUCT_MESSAGE_MS);
    Counter parseResponseMS        = counters.findCounter(CollectionMapper.PARSE_RESPONSE_MS);
    Counter performRequestMS       = counters.findCounter(CollectionMapper.PERFORM_REQUEST_MS);
    Counter totalRequestHandlingMS = counters.findCounter(CollectionMapper.TOTAL_REQUEST_HANDLING_MS);
   
    Log.info("Total ConstructMessage percent: "+ (double)(constructMessageMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
 
View Full Code Here


   
    int retVal = job.waitForCompletion(true)?0:1;
   
    CounterGroup counters          = job.getCounters().getGroup(CollectionMapper.RESOLVER_GROUP);   
    Counter constructMessageMS     = counters.findCounter(CollectionMapper.CONSTRUCT_MESSAGE_MS);
    Counter parseResponseMS        = counters.findCounter(CollectionMapper.PARSE_RESPONSE_MS);
    Counter performRequestMS       = counters.findCounter(CollectionMapper.PERFORM_REQUEST_MS);
    Counter totalRequestHandlingMS = counters.findCounter(CollectionMapper.TOTAL_REQUEST_HANDLING_MS);
   
    Log.info("Total ConstructMessage percent: "+ (double)(constructMessageMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
    Log.info("Total ParseResponse percent:    "+ (double)(parseResponseMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
 
View Full Code Here

    int retVal = job.waitForCompletion(true)?0:1;
   
    CounterGroup counters          = job.getCounters().getGroup(CollectionMapper.RESOLVER_GROUP);   
    Counter constructMessageMS     = counters.findCounter(CollectionMapper.CONSTRUCT_MESSAGE_MS);
    Counter parseResponseMS        = counters.findCounter(CollectionMapper.PARSE_RESPONSE_MS);
    Counter performRequestMS       = counters.findCounter(CollectionMapper.PERFORM_REQUEST_MS);
    Counter totalRequestHandlingMS = counters.findCounter(CollectionMapper.TOTAL_REQUEST_HANDLING_MS);
   
    Log.info("Total ConstructMessage percent: "+ (double)(constructMessageMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
    Log.info("Total ParseResponse percent:    "+ (double)(parseResponseMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
    Log.info("Total PerformRequest percent:   "+ (double)(performRequestMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
 
View Full Code Here

   
    CounterGroup counters          = job.getCounters().getGroup(CollectionMapper.RESOLVER_GROUP);   
    Counter constructMessageMS     = counters.findCounter(CollectionMapper.CONSTRUCT_MESSAGE_MS);
    Counter parseResponseMS        = counters.findCounter(CollectionMapper.PARSE_RESPONSE_MS);
    Counter performRequestMS       = counters.findCounter(CollectionMapper.PERFORM_REQUEST_MS);
    Counter totalRequestHandlingMS = counters.findCounter(CollectionMapper.TOTAL_REQUEST_HANDLING_MS);
   
    Log.info("Total ConstructMessage percent: "+ (double)(constructMessageMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
    Log.info("Total ParseResponse percent:    "+ (double)(parseResponseMS.getValue()*100L)/((double)totalRequestHandlingMS.getValue()));
    Log.info("Total PerformRequest percent:   "+ (double)(performRequestMS.getValue()*100L)/((double)totalRequestHandlingMS.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

    for(Map.Entry<TaskId, Task> entry : tasks.entrySet()) {
      long value = 0;
      CounterGroup group = entry.getValue().getCounters()
        .getGroup($(COUNTER_GROUP));
      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

                  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 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

    if (!withCounters) {
      assertEquals(0, counters.size());
    }
    else {
      assertEquals(1, counters.size());
      assertEquals(4, counters.findCounter("text").getValue());
    }

  }

  @SuppressWarnings({"unchecked"})
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.