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

none of the rpc servers check the protcol name for validity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.2
    • 0.10.0
    • ipc
    • 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

        1. protocol-name.patch
          3 kB
          Owen O'Malley

        Activity

          People

            omalley Owen O'Malley
            omalley Owen O'Malley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: