Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-629

none of the rpc servers check the protcol name for validity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.2
    • Fix Version/s: 0.10.0
    • Component/s: ipc
    • Labels:
      None

      Description

      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);
      }

        Attachments

          Activity

            People

            • Assignee:
              owen.omalley Owen O'Malley
              Reporter:
              owen.omalley Owen O'Malley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: