[ 
https://issues.apache.org/jira/browse/HDFS-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805505#action_12805505
 ] 

Zlatin Balevsky commented on HDFS-928:
--------------------------------------

@Konstantin: This will make possible using a mock object that implements the 
DatanodeProtocol interface which in turn will make writing unit tests much 
faster and simpler.

@Eli: I'm not saying there is any specific problem with the current way; I'm 
interested in having the flexibility to swap in any implementation, including 
such that do not use any kind of RPC.  

> Ability to provide custom DatanodeProtocol implementation
> ---------------------------------------------------------
>
>                 Key: HDFS-928
>                 URL: https://issues.apache.org/jira/browse/HDFS-928
>             Project: Hadoop HDFS
>          Issue Type: Wish
>          Components: data-node
>            Reporter: Zlatin Balevsky
>            Priority: Trivial
>
> This should make testing easier as well as allow users to provide their own 
> RPC/namenode implementations.  It's pretty straightforward:
> 1. add 
> interface DatanodeProtocolProvider {
>   DatanodeProtocol getNameNode(Configuration conf);
> }
> 2. add a config setting like "dfs.datanode.protocol.impl"
> 3. create a default implementation and copy/paste the RPC initialization code 
> there

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

Reply via email to