[
https://issues.apache.org/jira/browse/HBASE-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242929#comment-13242929
]
Todd Lipcon commented on HBASE-5688:
------------------------------------
bq. Tell me more about your PBUF idea. You mean a first field in each message
that is always PBUF
Something like:
{code}
public byte[] protoToZKData(Message m) {
return Bytes.concat(Bytes.toString("PBUF"), m.toByteArray())
}
{code}
i.e literally prepend the bytes to the encoded protobuf.
Then when we read, ensure that the first four bytes are PBUF. If not, we can
barf and say "looks like this cluster is from the wrong version of HBase, it's
missing the PBUF magic header on ZK node /hbase/root-server". Without the magic
number, we'd end up getting a weird decoding exception
> Convert zk root-region-server znode content to pb
> -------------------------------------------------
>
> Key: HBASE-5688
> URL: https://issues.apache.org/jira/browse/HBASE-5688
> Project: HBase
> Issue Type: Task
> Reporter: stack
> Attachments: 5688.txt
>
>
> Move the root-region-server znode content from the versioned bytes that
> ServerName.getVersionedBytes outputs to instead be pb.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira