Merge -r 1373822:1373823 from trunk to branch-2. Fixes: MAPREDUCE-4562. Support for "FileSystemCounter" legacy counter group name for compatibility reasons is creating incorrect counter name.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1373824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1294ad1df7
commit
832e7c6dc3
|
@ -43,6 +43,10 @@ Branch-2 ( Unreleased changes )
|
|||
MAPREDUCE-4484. Incorrect IS_MINI_YARN_CLUSTER property name in YarnConfiguration.
|
||||
(ahmed.radwan via tucu)
|
||||
|
||||
MAPREDUCE-4562. Support for "FileSystemCounter" legacy counter group name
|
||||
for compatibility reasons is creating incorrect counter name.
|
||||
(Jarek Jarcec Cecho via tomwhite)
|
||||
|
||||
Release 2.1.0-alpha - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -82,7 +82,7 @@ public abstract class AbstractCounters<C extends Counter,
|
|||
TaskCounter.class.getName());
|
||||
legacyMap.put("org.apache.hadoop.mapred.JobInProgress$Counter",
|
||||
JobCounter.class.getName());
|
||||
legacyMap.put("FileSystemCounter", FileSystemCounter.class.getName());
|
||||
legacyMap.put("FileSystemCounters", FileSystemCounter.class.getName());
|
||||
}
|
||||
|
||||
private final Limits limits = new Limits();
|
||||
|
|
|
@ -152,7 +152,7 @@ public class TestCounters {
|
|||
Counters counters = new Counters();
|
||||
counters.incrCounter(Task.Counter.MAP_INPUT_RECORDS, 1);
|
||||
counters.incrCounter(JobInProgress.Counter.DATA_LOCAL_MAPS, 1);
|
||||
counters.findCounter("FileSystemCounter", "FILE_BYTES_READ").increment(1);
|
||||
counters.findCounter("FileSystemCounters", "FILE_BYTES_READ").increment(1);
|
||||
|
||||
checkLegacyNames(counters);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ public class TestCounters {
|
|||
assertEquals("New name and method", 1, counters.findCounter("file",
|
||||
FileSystemCounter.BYTES_READ).getValue());
|
||||
assertEquals("Legacy name", 1, counters.findCounter(
|
||||
"FileSystemCounter",
|
||||
"FileSystemCounters",
|
||||
"FILE_BYTES_READ").getValue());
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ public class TestCounters {
|
|||
HashSet<String> groups = new HashSet<String>(counters.getGroupNames());
|
||||
HashSet<String> expectedGroups = new HashSet<String>();
|
||||
expectedGroups.add("group1");
|
||||
expectedGroups.add("FileSystemCounter"); //Legacy Name
|
||||
expectedGroups.add("FileSystemCounters"); //Legacy Name
|
||||
expectedGroups.add("org.apache.hadoop.mapreduce.FileSystemCounter");
|
||||
|
||||
assertEquals(expectedGroups, groups);
|
||||
|
|
Loading…
Reference in New Issue