Package org.apache.drill.exec.exception

Examples of org.apache.drill.exec.exception.SetupException


 
  public SchemaProvider getSchemaProvider(StorageEngineConfig engineConfig) throws SetupException{
    SchemaProvider engine = activeEngines.get(engineConfig);
    if(engine != null) return engine;
    Constructor<? extends SchemaProvider> c = allProviders.get(engineConfig.getClass());
    if(c == null) throw new SetupException(String.format("Failure finding StorageSchemaProvider constructor for config %s", engineConfig));
    try {
      return c.newInstance(engineConfig, config);
    } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
      Throwable t = e instanceof InvocationTargetException ? ((InvocationTargetException)e).getTargetException() : e;
      if(t instanceof SetupException) throw ((SetupException) t);
      throw new SetupException(String.format("Failure setting up new storage engine configuration for config %s", engineConfig), t);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.exception.SetupException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.