@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName); init(); configured = true; log.info("JDBC Driver {} configured", getFullyQualifiedName()); }
@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName); init(); configured = true; Class<? extends QueryCostCalculator> queryCostCalculatorClass = getConf().getClass(JDBC_COST_CALCULATOR, StaticCostCalculator.class, QueryCostCalculator.class); try { queryCostCalculator = queryCostCalculatorClass.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new LensException("Can't instantiate query cost calculator of class: " + queryCostCalculatorClass, e); } //For initializing the decider class instance queryCostCalculator.init(this); log.info("JDBC Driver {} configured", getFullyQualifiedName()); }
@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName); config = new ESDriverConfig(getConf()); Class klass;
@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName); config = new ESDriverConfig(getConf()); Class klass;
@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName); this.hiveConf = new HiveConf(conf, HiveDriver.class); this.hiveConf.addResource(getConf()); connectionClass = getConf().getClass(HIVE_CONNECTION_CLASS, EmbeddedThriftConnection.class, ThriftConnection.class); isEmbedded = (connectionClass.getName().equals(EmbeddedThriftConnection.class.getName())); connectionExpiryTimeout = getConf().getLong(HS2_CONNECTION_EXPIRY_DELAY, DEFAULT_EXPIRY_DELAY); whetherCalculatePriority = getConf().getBoolean(HS2_CALCULATE_PRIORITY, true); Class<? extends QueryCostCalculator> queryCostCalculatorClass = getConf().getClass(HS2_COST_CALCULATOR, FactPartitionBasedQueryCostCalculator.class, QueryCostCalculator.class); try { queryCostCalculator = queryCostCalculatorClass.newInstance(); } catch (InstantiationException | IllegalAccessException e) { throw new LensException("Can't instantiate query cost calculator of class: " + queryCostCalculatorClass, e); } queryPriorityDecider = new CostRangePriorityDecider( new CostToPriorityRangeConf(getConf().get(HS2_PRIORITY_RANGES, HS2_PRIORITY_DEFAULT_RANGES)) ); log.info("Hive driver {} configured successfully", getFullyQualifiedName()); }
@Override public void configure(Configuration conf, String driverType, String driverName) throws LensException { super.configure(conf, driverType, driverName);