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

Examples of org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.RootRegionServer


  public static ServerName parseFrom(final byte [] data) throws DeserializationException {
    if (data == null || data.length <= 0) return null;
    if (ProtobufUtil.isPBMagicPrefix(data)) {
      int prefixLen = ProtobufUtil.lengthOfPBMagic();
      try {
        RootRegionServer rss =
          RootRegionServer.newBuilder().mergeFrom(data, prefixLen, data.length - prefixLen).build();
        org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.ServerName sn = rss.getServer();
        return new ServerName(sn.getHostName(), sn.getPort(), sn.getStartCode());
      } catch (InvalidProtocolBufferException e) {
        // A failed parse of the znode is pretty catastrophic. Rather than loop
        // retrying hoping the bad bytes will changes, and rather than change
        // the signature on this method to add an IOE which will send ripples all
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos.RootRegionServer

Copyright © 2018 www.massapicom. 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.