Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
all
-
Reviewed
-
Provided a new method to update counters. "incrCounter(String group, String counter, long amount)"
Description
Currently to use the counters from within Map/Reduce code Enums have to be used, the Enum class defines the group and the Enum itself the counter. Internally they are converted to Strings (the class name and the enum toString) and you can retrieve them as strings from the client API.
Using dynamic counters (driven by configuration of the map/reduce) is not easy with the counters Enum based API. For example, currently I have an Enum class with 50 enums and we have to map the cardinality to the counter name on the client. This is cumbersome.
This could be easily improve by adding a String based counter method increment(String group, String counter, long count) to allow use of the counters without Enums.
Internally this method already exists, so the changes are minimal.
Attachments
Attachments
Issue Links
- blocks
-
HADOOP-1328 Hadoop Streaming needs to provide a way for the stream plugin to update global counters
- Closed
-
HADOOP-1480 pipes should be able to set user counters
- Closed
-
HADOOP-3230 Add command line access to named counters
- Closed
- is blocked by
-
HADOOP-2248 Word count example is spending 24% of the time in incrCounter
- Closed
- is related to
-
HADOOP-2818 Remove deprecated Counters.getDisplayName(), getCounterNames(), getCounter(String counterName)
- Closed