use of org.apache.drill.exec.store.sys.store.provider.CachingPersistentStoreProvider in project drill by apache.
the class PersistentStoreRegistry method newPStoreProvider.
@SuppressWarnings("unchecked")
public PersistentStoreProvider newPStoreProvider() throws ExecutionSetupException {
try {
String storeProviderClassName = config.getString(ExecConstants.SYS_STORE_PROVIDER_CLASS);
logger.info("Using the configured PStoreProvider class: '{}'.", storeProviderClassName);
Class<? extends PersistentStoreProvider> storeProviderClass = (Class<? extends PersistentStoreProvider>) Class.forName(storeProviderClassName);
Constructor<? extends PersistentStoreProvider> c = storeProviderClass.getConstructor(PersistentStoreRegistry.class);
return new CachingPersistentStoreProvider(c.newInstance(this));
} catch (ConfigException.Missing | ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
logger.error(e.getMessage(), e);
throw new ExecutionSetupException("A System Table provider was either not specified or could not be found or instantiated", e);
}
}
Aggregations