public static ZooKeeperProtos.Master parse(byte[] data) throws DeserializationException {
    if (data == null) {
      return null;
    }
    int prefixLen = ProtobufUtil.lengthOfPBMagic();
    try {
      return ZooKeeperProtos.Master.parser().parseFrom(data, prefixLen, data.length - prefixLen);
    } catch (InvalidProtocolBufferException e) {
      throw new DeserializationException(e);
    }
  }
@param data zookeeper data. may be null
@return pb object of master, null if no active master
@throws DeserializationException if the parsing fails
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MasterAddressTracker.java