[
https://issues.apache.org/jira/browse/HADOOP-10376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Li updated HADOOP-10376:
------------------------------
Attachment: HADOOP-10376.patch
Attached my patch to create a generic refresh protocol.
Motivation: currently there's too much duplication in the different
refresh*Protocols, and the process of adding a new one involves making changes
in 10+ files.
There were a couple different ways I thought of doing this:
Method 1: add multiple methods to the GenericRefreshProtocol interface
Method 2: have an identifier passed in, and have the receiving objects dispatch
accordingly
Method 1:
- Most type safe
- Requires that each implementer implement *all* of its refresh methods (will
basically limit this for use on the namenode)
- Requires users to modify 3 additional files to add a new refresh item, adding
refresh* methods
Method 2
- Receiver can make best effort to respond to requests to refresh
- Users need only modify 1 additional file to add a new refresh item, user only
needs to add a static String to the interface
- Request types not compiler enforced
The patch I've submitted uses method 2, preferring its flexibility and ease of
adding new protocols.
> Refactor refresh*Protocols into a single generic refreshConfigProtocol
> ----------------------------------------------------------------------
>
> Key: HADOOP-10376
> URL: https://issues.apache.org/jira/browse/HADOOP-10376
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Chris Li
> Assignee: Chris Li
> Priority: Minor
> Attachments: HADOOP-10376.patch
>
>
> See https://issues.apache.org/jira/browse/HADOOP-10285
> There are starting to be too many refresh*Protocols We can refactor them to
> use a single protocol with a variable payload to choose what to do.
> Thereafter, we can return an indication of success or failure.
--
This message was sent by Atlassian JIRA
(v6.2#6252)