Search in sources :

Example 1 with SplitRegionRequest

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();
}
Also used : SplitRegionRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SplitRegionRequest) RegionSpecifier(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier)

Aggregations

SplitRegionRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SplitRegionRequest)1 RegionSpecifier (org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier)1