Review Board 1.7.22

hbase-5688 Convert zk root-region-server znode content to pb

Review Request #4600 - Created April 1, 2012 and updated

Michael Stack
Changes the content of the root location znode, root-region-server, to be
four magic bytes ('PBUF') followed by a protobuf message that holds the
ServerName of the server currently hosting root.

D src/main/java/org/apache/hadoop/hbase/catalog/
  Removed. Had two methods, one to add root-region-server znode and another
  to removed it.  Rather, put these methods in RootRegionTracker.  It
  tracks root-region-server znode.  Having all to do w/ root-region-server
  is more cohesive.  Also makes it so can encapsulate in one class
  all to do w/ create, delete, and reading of root-region-server.
  We also want to purge the catalog package (See note at head of
M src/main/java/org/apache/hadoop/hbase/client/
M src/main/java/org/apache/hadoop/hbase/master/
M src/main/java/org/apache/hadoop/hbase/regionserver/
  Get root region location from RootRegionTracker rather than from RootLocationEditor.
A src/main/java/org/apache/hadoop/hbase/protobuf/
  Utility to do w/ protobuf handling.  Has methods to help prefixing
  and stripping from serialized protobuf messages some 'magic'.
A src/main/java/org/apache/hadoop/hbase/protobuf/generated/
  PB generated.
M src/main/java/org/apache/hadoop/hbase/util/
  Use new RootRegionTracker method for getting content of znode rather
  than do it all here (going via RootRegionTracker, we can keep how
  the znode content is serialized private to the RootRegionTracker class.
M src/main/java/org/apache/hadoop/hbase/zookeeper/
  Has the methods that used to be in RootLocationEditor plus a new

Posted (April 1, 2012, 4:30 p.m.)
Looks good to me.
Posted (April 1, 2012, 4:41 p.m.)


I think prefixedWithPBMagic would be a better name for this method.
  1. Disagree.
Javadoc would be desirable.
  1. Classname says what it does.
White space.
  1. Will fix on commit.