public static List<VisibilityLabel> readLabelsFromZKData(byte[] data)
    throws DeserializationException {
    if (ProtobufUtil.isPBMagicPrefix(data)) {
      int pblen = ProtobufUtil.lengthOfPBMagic();
      try {
        VisibilityLabelsRequest.Builder builder = VisibilityLabelsRequest.newBuilder();
        ProtobufUtil.mergeFrom(builder, data, pblen, data.length - pblen);
        return builder.getVisLabelList();
      } catch (IOException e) {
        throw new DeserializationException(e);
      }
    }
    return null;
  }
Reads back from the zookeeper. The data read here is of the form written by
writeToZooKeeper(Map&lt;byte[], Integer&gt; entries).
@return Labels and their ordinal details
hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java