Package org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos

Examples of org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.MetaRegionServer.toByteArray()


    // the znode content.
    MetaRegionServer pbrsr = MetaRegionServer.newBuilder()
      .setServer(ProtobufUtil.toServerName(serverName))
      .setRpcVersion(HConstants.RPC_CURRENT_VERSION)
      .setState(state.convert()).build();
    byte[] data = ProtobufUtil.prependPBMagic(pbrsr.toByteArray());
    try {
      ZKUtil.setData(zookeeper, zookeeper.metaServerZNode, data);
    } catch(KeeperException.NoNodeException nne) {
      LOG.debug("META region location doesn't existed, create it");
      ZKUtil.createAndWatch(zookeeper, zookeeper.metaServerZNode, data);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.