|
@@ -59,18 +59,22 @@ public class Counters implements Writable, Iterable<Counters.Group> {
|
|
|
private static char[] charsToEscape = {GROUP_OPEN, GROUP_CLOSE,
|
|
|
COUNTER_OPEN, COUNTER_CLOSE,
|
|
|
UNIT_OPEN, UNIT_CLOSE};
|
|
|
+ private static final JobConf conf = new JobConf();
|
|
|
/** limit on the size of the name of the group **/
|
|
|
- private static final int GROUP_NAME_LIMIT = 128;
|
|
|
+ private static final int GROUP_NAME_LIMIT =
|
|
|
+ conf.getInt("mapreduce.job.counters.group.name.max", 128);
|
|
|
/** limit on the size of the counter name **/
|
|
|
- private static final int COUNTER_NAME_LIMIT = 64;
|
|
|
+ private static final int COUNTER_NAME_LIMIT =
|
|
|
+ conf.getInt("mapreduce.job.counters.counter.name.max", 64);
|
|
|
|
|
|
- private static final JobConf conf = new JobConf();
|
|
|
/** limit on counters **/
|
|
|
public static int MAX_COUNTER_LIMIT =
|
|
|
- conf.getInt("mapreduce.job.counters.limit", 120);
|
|
|
+ conf.getInt("mapreduce.job.counters.limit", // deprecated in 0.23
|
|
|
+ conf.getInt("mapreduce.job.counters.max", 120));
|
|
|
|
|
|
/** the max groups allowed **/
|
|
|
- static final int MAX_GROUP_LIMIT = 50;
|
|
|
+ public static final int MAX_GROUP_LIMIT =
|
|
|
+ conf.getInt("mapreduce.job.counters.groups.max", 50);
|
|
|
|
|
|
/** the number of current counters**/
|
|
|
private int numCounters = 0;
|