use of org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SplitRegionRequest in project hbase by apache.
the class ProtobufUtil method buildSplitRegionRequest.
/**
* Create a SplitRegionRequest for a given region name
*
* @param regionName the name of the region to split
* @param splitPoint the split point
* @return a SplitRegionRequest
*/
public static SplitRegionRequest buildSplitRegionRequest(final byte[] regionName, final byte[] splitPoint) {
SplitRegionRequest.Builder builder = SplitRegionRequest.newBuilder();
RegionSpecifier region = RequestConverter.buildRegionSpecifier(RegionSpecifierType.REGION_NAME, regionName);
builder.setRegion(region);
if (splitPoint != null) {
builder.setSplitPoint(UnsafeByteOperations.unsafeWrap(splitPoint));
}
return builder.build();
}
Aggregations