@Override
  public void initialize(TableDescriptor tableDescriptor, Configuration conf) throws IOException {
    String prefixLengthString = tableDescriptor.getValue(PREFIX_LENGTH_KEY);
    if (prefixLengthString == null) {
      prefixLengthString = conf.get(PREFIX_LENGTH_KEY);
      if (prefixLengthString == null) {
        LOG.error("{} not specified for table {}. " + "Using the default RegionSplitRestriction",
          PREFIX_LENGTH_KEY, tableDescriptor.getTableName());
        return;
      }
    }
    try {
      prefixLength = Integer.parseInt(prefixLengthString);
    } catch (NumberFormatException ignored) {
    }
    if (prefixLength <= 0) {
      LOG.error(
        "Invalid value for {} for table {}:{}. " + "Using the default RegionSplitRestriction",
        PREFIX_LENGTH_KEY, tableDescriptor.getTableName(), prefixLengthString);
    }
  }
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