hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-629) none of the rpc servers check the protcol name for validity
Date Tue, 05 Dec 2006 00:15:25 GMT
     [ http://issues.apache.org/jira/browse/HADOOP-629?page=all ]

Owen O'Malley updated HADOOP-629:
---------------------------------

    Attachment: protocol-name.patch

This patch fixes the name node, job tracker, and task tracker to reject rpc connections for
the wrong protocols.

> none of the rpc servers check the protcol name for validity
> -----------------------------------------------------------
>
>                 Key: HADOOP-629
>                 URL: http://issues.apache.org/jira/browse/HADOOP-629
>             Project: Hadoop
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 0.7.2
>            Reporter: Owen O'Malley
>         Assigned To: Wendy Chien
>         Attachments: protocol-name.patch
>
>
> All of the Hadoop RPC servers either ignore the protocol name or do:
> if (protocol.equals(Prot1.class.getName()) {
>   return Prot1.versionId;
> } else {
>   return Prot2.versionId;
> }
> A much better structure would be:
> if (Prot1.class.getName().equals(protocol)) {
>   return Prot1.versionId;
> } else if (Prot2.class.getName().equals(protocol)) {
>   return Prot2.versionId;
> } else {
>   throw new VersionMismatchException("Expected protocol Prot1 or Prot2 and received:
" + protocol);
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message