标签:
context.getCounter("ssx", "demo1").increment(1); context.getCounter("ssx", "demo2").increment(2); CounterGroup group= job.getCounters().getGroup("ssx"); Iterator<Counter> iterator= group.iterator(); while (iterator.hasNext()) { Counter counter = (Counter) iterator.next(); System.out.println(counter.getName()+":::"+counter.getValue()); } System.out.println("++++++++++++++++++++++"); Counter counters=job.getCounters().findCounter("ssx", "demo1"); long value=counters.getValue();// System.out.println("demo1的值"+value);
标签:
原文地址:http://www.cnblogs.com/52hadoop/p/4844499.html