RegionGroupingStrategy getStrategy(final Configuration conf, final String key,
    final String defaultValue) throws IOException {
    Class<? extends RegionGroupingStrategy> clazz;
    try {
      clazz = Strategies.valueOf(conf.get(key, defaultValue)).clazz;
    } catch (IllegalArgumentException exception) {
      // Fall back to them specifying a class name
      // Note that the passed default class shouldn't actually be used, since the above only fails
      // when there is a config value present.
      clazz = conf.getClass(key, IdentityGroupingStrategy.class, RegionGroupingStrategy.class);
    }
    LOG.info("Instantiating RegionGroupingStrategy of type " + clazz);
    try {
      final RegionGroupingStrategy result = clazz.getDeclaredConstructor().newInstance();
      result.init(conf, providerId);
      return result;
    } catch (Exception e) {
      LOG.error(
        "couldn't set up region grouping strategy, check config key " + REGION_GROUPING_STRATEGY);
      LOG.debug("Exception details for failure to load region grouping strategy.", e);
      throw new IOException("couldn't set up region grouping strategy", e);
    }
  }
instantiate a strategy from a config property. requires conf to have already been set (as well
as anything the provider might need to read).
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/RegionGroupingProvider.java