hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom White (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-1915) adding counters methods using String (as opposed to Enum)
Date Wed, 02 Apr 2008 21:23:24 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tom White updated HADOOP-1915:
------------------------------

    Attachment: hadoop-1915-v4.patch

Owen, you're right - the patch doesn't work properly with localization. Thanks for catching
that.

I've created a new patch to deal with this by changing the external format of Counter to include
displayName, but only if it differs from name:

{noformat}
name (false | true displayName) value
{noformat}

(The reason that we can't just use displayName is that we need name as the identifier - in
the absence of ordinal - and there is no way of going from displayName to name.)

I've just tested this and localization is still not working - so this needs some more investigation
before it's ready.

> adding counters methods using String (as opposed to Enum)
> ---------------------------------------------------------
>
>                 Key: HADOOP-1915
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1915
>             Project: Hadoop Core
>          Issue Type: New Feature
>         Environment: all
>            Reporter: Alejandro Abdelnur
>            Assignee: Tom White
>            Priority: Minor
>             Fix For: 0.17.0
>
>         Attachments: hadoop-1915-v2.patch, hadoop-1915-v3.patch, hadoop-1915-v4.patch,
hadoop-1915.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message