in hbase-common/src/main/java/org/apache/omid/committable/hbase/RegionSplitter.java [147:174]
public static SplitAlgorithm newSplitAlgoInstance(Configuration conf,
String splitClassName) throws IOException {
Class<?> splitClass;
// For split algorithms builtin to RegionSplitter, the user can specify
// their simple class name instead of a fully qualified class name.
if (splitClassName.equals(UniformSplit.class.getSimpleName())) {
splitClass = UniformSplit.class;
} else {
try {
splitClass = conf.getClassByName(splitClassName);
} catch (ClassNotFoundException e) {
throw new IOException("Couldn't load split class " + splitClassName, e);
}
if (splitClass == null) {
throw new IOException("Failed loading split class " + splitClassName);
}
if (!SplitAlgorithm.class.isAssignableFrom(splitClass)) {
throw new IOException(
"Specified split class doesn't implement SplitAlgorithm");
}
}
try {
return splitClass.asSubclass(SplitAlgorithm.class).getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new IOException("Problem loading split algorithm: ", e);
}
}