MAPREDUCE-4844. Counters / AbstractCounters have constant references not declared final. (Brahma Reddy Battula via gera)
(cherry picked from commit a0795c1e81
)
This commit is contained in:
parent
0dde8c079d
commit
3757e731e6
|
@ -76,6 +76,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
causes counter limits are not reset correctly.
|
causes counter limits are not reset correctly.
|
||||||
(Zhihai Xu via harsh)
|
(Zhihai Xu via harsh)
|
||||||
|
|
||||||
|
MAPREDUCE-4844. Counters / AbstractCounters have constant references not
|
||||||
|
declared final. (Brahma Reddy Battula via gera)
|
||||||
|
|
||||||
Release 2.7.0 - UNRELEASED
|
Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -62,9 +62,9 @@ import com.google.common.collect.Iterators;
|
||||||
public class Counters
|
public class Counters
|
||||||
extends AbstractCounters<Counters.Counter, Counters.Group> {
|
extends AbstractCounters<Counters.Counter, Counters.Group> {
|
||||||
|
|
||||||
public static int MAX_COUNTER_LIMIT = Limits.getCountersMax();
|
public static final int MAX_COUNTER_LIMIT = Limits.getCountersMax();
|
||||||
public static int MAX_GROUP_LIMIT = Limits.getGroupsMax();
|
public static final int MAX_GROUP_LIMIT = Limits.getGroupsMax();
|
||||||
private static HashMap<String, String> depricatedCounterMap =
|
private static final HashMap<String, String> depricatedCounterMap =
|
||||||
new HashMap<String, String>();
|
new HashMap<String, String>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
|
@ -64,11 +64,11 @@ public abstract class AbstractCounters<C extends Counter,
|
||||||
/**
|
/**
|
||||||
* A cache from enum values to the associated counter.
|
* A cache from enum values to the associated counter.
|
||||||
*/
|
*/
|
||||||
private Map<Enum<?>, C> cache = Maps.newIdentityHashMap();
|
private final Map<Enum<?>, C> cache = Maps.newIdentityHashMap();
|
||||||
//framework & fs groups
|
//framework & fs groups
|
||||||
private Map<String, G> fgroups = new ConcurrentSkipListMap<String, G>();
|
private final Map<String, G> fgroups = new ConcurrentSkipListMap<String, G>();
|
||||||
// other groups
|
// other groups
|
||||||
private Map<String, G> groups = new ConcurrentSkipListMap<String, G>();
|
private final Map<String, G> groups = new ConcurrentSkipListMap<String, G>();
|
||||||
private final CounterGroupFactory<C, G> groupFactory;
|
private final CounterGroupFactory<C, G> groupFactory;
|
||||||
|
|
||||||
// For framework counter serialization without strings
|
// For framework counter serialization without strings
|
||||||
|
|
Loading…
Reference in New Issue