HBase
  1. HBase
  2. HBASE-2877

Unnecessary byte written when serializing a Writable RPC parameter

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: 0.20.5, 0.89.20100621, 0.90.0, 0.90.1, 0.90.2, 0.90.3, 0.90.4, 0.90.5, 0.90.6, 0.92.0, 0.92.1, 0.94.0
    • Fix Version/s: None
    • Component/s: IPC/RPC
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change
    • Tags:
      rpc, ipc

      Description

      When HbaseObjectWritable#writeObject serializes a Writable RPC parameter, it writes its "class code" twice to the wire. writeClassCode is already called once unconditionally at the beginning of the method, and for Writable arguments, it's called a second time towards the end of the method. It seems that the code is trying to deal with the "declared type" vs. "actual type" of a parameter. The Hadoop RPC code was already doing this before Stack changed it to use codes in r608738 for HADOOP-2519. It's not documented when this is useful though, and I couldn't find any use case. Every RPC I've seen so far just ends up with the same byte sent twice to the wire.

        Activity

        Hide
        Andrew Purtell added a comment -

        Stale

        Show
        Andrew Purtell added a comment - Stale

          People

          • Assignee:
            Unassigned
            Reporter:
            Benoit Sigoure
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development