Hadoop 自定义Counters

 

enum name:group name
enum filed:counter name
static enum ClaimsCounters {Missing,QUIED};


if(key.toString().contains("3")){
	arg3.incrCounter(ClaimsCounters.Missing, 1);
}else if(key.toString().contains("1")){
	arg3.incrCounter(ClaimsCounters.QUIED, 1);
}


信息:   mpMapper$ClaimsCounters
2012-3-21 10:29:49 org.apache.hadoop.mapred.Counters log
信息:     Missing=1
2012-3-21 10:29:49 org.apache.hadoop.mapred.Counters log
信息:     QUIED=5

你可能感兴趣的:(hadoop)