public static RegionSpecifier buildRegionSpecifier(final RegionSpecifierType type,
    final byte[] value) {
    RegionSpecifier.Builder regionBuilder = RegionSpecifier.newBuilder();
    regionBuilder.setValue(UnsafeByteOperations.unsafeWrap(value));
    regionBuilder.setType(type);
    return regionBuilder.build();
  }
Convert a byte array to a protocol buffer RegionSpecifier
@param type  the region specifier type
@param value the region specifier byte array value
@return a protocol buffer RegionSpecifier
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java