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] Created: (HADOOP-629) none of the rpc servers check the protcol name for validity
Date Tue, 24 Oct 2006 05:35:16 GMT
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
             Fix For: 0.8.0


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