/** * @param implClass Implementation class * @param priority priority * @param conf configuration * @throws java.io.IOException Exception */ public E checkAndLoadInstance(Class<?> implClass, int priority, Configuration conf) throws IOException { // create the instance C impl; try { impl = checkAndGetInstance(implClass); if (impl == null) { LOG.error("Cannot load coprocessor " + implClass.getSimpleName()); return null; } } catch (InstantiationException|IllegalAccessException e) { throw new IOException(e); } // create the environment E env = createEnvironment(impl, priority, loadSequence.incrementAndGet(), conf); assert env instanceof BaseEnvironment; ((BaseEnvironment<C>) env).startup(); // HBASE-4014: maintain list of loaded coprocessors for later crash analysis // if server (master or regionserver) aborts. coprocessorNames.add(implClass.getName()); return env; }