@Override
  protected void configureForRegion(HRegion region) {
    super.configureForRegion(region);
    prefixLength = 0;

    // read the prefix length from the table descriptor
    String prefixLengthString = region.getTableDescriptor().getValue(PREFIX_LENGTH_KEY);
    if (prefixLengthString == null) {
      // read the deprecated value
      prefixLengthString = region.getTableDescriptor().getValue(PREFIX_LENGTH_KEY_DEPRECATED);
      if (prefixLengthString == null) {
        LOG.error(PREFIX_LENGTH_KEY + " not specified for table "
          + region.getTableDescriptor().getTableName() + ". Using default RegionSplitPolicy");
        return;
      }
    }
    try {
      prefixLength = Integer.parseInt(prefixLengthString);
    } catch (NumberFormatException nfe) {
      /* Differentiate NumberFormatException from an invalid value range reported below. */
      LOG.error("Number format exception when parsing " + PREFIX_LENGTH_KEY + " for table "
        + region.getTableDescriptor().getTableName() + ":" + prefixLengthString + ". " + nfe);
      return;
    }
    if (prefixLength <= 0) {
      LOG.error("Invalid value for " + PREFIX_LENGTH_KEY + " for table "
        + region.getTableDescriptor().getTableName() + ":" + prefixLengthString
        + ". Using default RegionSplitPolicy");
    }
  }
A custom RegionSplitPolicy implementing a SplitPolicy that groups rows by a prefix of the row-key
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.
@deprecated since 3.0.0 and will be removed in 4.0.0. Use {@link RegionSplitRestriction},
            instead.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyPrefixRegionSplitPolicy.java