public static CompactRegionRequest buildCompactRegionRequest(byte[] regionName, boolean major,
    byte[] columnFamily) {
    CompactRegionRequest.Builder builder = CompactRegionRequest.newBuilder();
    RegionSpecifier region = buildRegionSpecifier(RegionSpecifierType.REGION_NAME, regionName);
    builder.setRegion(region);
    builder.setMajor(major);
    if (columnFamily != null) {
      builder.setFamily(UnsafeByteOperations.unsafeWrap(columnFamily));
    }
    return builder.build();
  }
Create a CompactRegionRequest for a given region name
@param regionName the name of the region to get info
@param major      indicator if it is a major compaction
@return a CompactRegionRequest
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java