[ 
https://issues.apache.org/jira/browse/HADOOP-10376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13935731#comment-13935731
 ] 

Benoy Antony commented on HADOOP-10376:
---------------------------------------

Great idea. I assume that the goal is to enable refresh capability for a 
feature in a generic fashion. 
Based on our discussion, like to suggest the following approach for 
consideration. 

Create a RefreshProtocol  which accepts a feature-id and a variable payload.
A server which supports the protocol loads a set of classes which implements an 
interface , say _RefreshHandler_
The RefreshHandler implementations are specified in Configuration.

{code:title=RefreshHandler.java|borderStyle=solid}
public interface RefreshHandler {
        
        public String getId();
        
        public boolean refresh (String payload) ;

}
{code}
When handling the refresh requests, the server delegates it to matching 
_RefreshHandler_ based on feature_id.
The feature_id can also be a full class name in which case, the server loads 
the class and passes the payload.

The client issues commands of the form  hadoop dfsadmin -refresh feature-id 
arg1 arg2...

> 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)

Reply via email to