hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-629) none of the rpc servers check the protcol name for validity
Date Tue, 05 Dec 2006 00:33:22 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-629?page=comments#action_12455477 ] 
            
Hadoop QA commented on HADOOP-629:
----------------------------------

+1, http://issues.apache.org/jira/secure/attachment/12346387/protocol-name.patch applied and
successfully tested against trunk revision r481432

> 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: Owen O'Malley
>             Fix For: 0.10.0
>
>         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