Multiple RPC Servers using same object instance
-----------------------------------------------

                 Key: HADOOP-6469
                 URL: https://issues.apache.org/jira/browse/HADOOP-6469
             Project: Hadoop Common
          Issue Type: New Feature
            Reporter: Dmytro Molkov


In HDFS-599 we want to be able to run multiple RPC servers on the namenode. One 
for DataNodes another for the rest of the protocols.
The problem right now is that checking if the protocol is exposed is done on 
the handler side (the NameNode in our case).

In our usecase we want to be able to tell if the request is coming on the 
"datanode port" or "the rest port" and based on that throw an exception when 
datanodes are accessing the client port and vice versa. Since the JobTracker 
has the same abstraction of Clients and Slaves those might later also be split 
on to different servers. So creating a solution just inside of the NameNode is 
not really an options, especially since we could not come up with one that 
would be clean and safe.

The proposal is to have RPC servers have "tags" associated with them in these 
cases. Then in the NameNode 2 servers created will have tags "DataNodeServer" 
and "ClientAdminServer". Another change is instead of using VersionedProtocol 
to check the version and the protocol in the getProtocolVersion method, Classes 
that can be used in multiple contexts should implement another interface 
(MultiServer?) that will have a checkProtocol? method that receives the name of 
the protocol and the Tag associated with the Server that received the request. 
This way in the checkProtocol we can specify which Protocols are allowed for 
servers tagged with Tag.

What do people think?

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