@Override
  public byte[] getRestrictedSplitPoint(byte[] splitPoint) {
    if (prefixLength > 0) {
      // group split keys by a prefix
      return Arrays.copyOf(splitPoint, Math.min(prefixLength, splitPoint.length));
    } else {
      return splitPoint;
    }
  }
A {@link RegionSplitRestriction} implementation that groups rows by a prefix of the row-key.
<p>
This ensures that a region is not split "inside" a prefix of a row key. I.e. rows can be
co-located in a region by their prefix.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyPrefixRegionSplitRestriction.java