You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Benoit Sigoure (JIRA)" <ji...@apache.org> on 2010/07/26 00:49:50 UTC

[jira] Created: (HBASE-2877) Unnecessary byte written when serializing a Writable RPC parameter

Unnecessary byte written when serializing a Writable RPC parameter
------------------------------------------------------------------

                 Key: HBASE-2877
                 URL: https://issues.apache.org/jira/browse/HBASE-2877
             Project: HBase
          Issue Type: Bug
          Components: ipc
    Affects Versions: 0.89.20100621, 0.20.5
            Reporter: Benoit Sigoure
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.