@Override public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
CacheUpdateMasterWork(Configuration conf, boolean shouldRunPrewarm) { this.shouldRunPrewarm = shouldRunPrewarm; String rawStoreClassName = MetastoreConf.getVar(conf, ConfVars.CACHED_RAW_STORE_IMPL, ObjectStore.class.getName()); try { rawStore = JavaUtils.getClass(rawStoreClassName, RawStore.class).newInstance(); rawStore.setConf(conf); } catch (InstantiationException | IllegalAccessException | MetaException e) { // MetaException here really means ClassNotFound (see the utility method). // So, if any of these happen, that means we can never succeed. throw new RuntimeException("Cannot instantiate " + rawStoreClassName, e); } }
private void setConfInternal(Configuration conf) { if (MetastoreConf.getBoolVar(conf, ConfVars.METASTORE_CACHE_CAN_USE_EVENT)) { canUseEvents = true; } else { canUseEvents = false; } LOG.info("canUseEvents is set to " + canUseEvents + " in cached Store"); String rawStoreClassName = MetastoreConf.getVar(conf, ConfVars.CACHED_RAW_STORE_IMPL, ObjectStore.class.getName()); if (rawStore == null) { try { rawStore = (JavaUtils.getClass(rawStoreClassName, RawStore.class)).newInstance(); } catch (Exception e) { throw new RuntimeException("Cannot instantiate " + rawStoreClassName, e); } } rawStore.setConf(conf); Configuration oldConf = this.conf; this.conf = conf; this.areTxnStatsSupported = MetastoreConf.getBoolVar(conf, ConfVars.HIVE_TXN_STATS_ENABLED); if (expressionProxy != null && conf != oldConf) { LOG.warn("Unexpected setConf when we were already configured"); } else { expressionProxy = PartFilterExprUtil.createExpressionProxy(conf); } }
@Before public void setUp() throws Exception { conf = MetastoreConf.newMetastoreConf(); MetastoreConf.setVar(conf, MetastoreConf.ConfVars.EXPRESSION_PROXY_CLASS, DefaultPartitionExpressionProxy.class.getName()); objectStore = new ObjectStore(); objectStore.setConf(conf); }
@Override public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
@Override public void setConf(final Configuration conf) { threadLocalConf.set(conf); final RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); } }
@Override public void setConf(final Configuration conf) { threadLocalConf.set(conf); final RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
@Override public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
@Override public void setConf(Configuration conf) { threadLocalConf.set(conf); RawStore ms = threadLocalMS.get(); if (ms != null) { ms.setConf(conf); // reload if DS related configuration is changed } }
private void initMS() { base.setConf(getConf()); }
private void initMS() { base.setConf(getConf()); }
private void initMS() { base.setConf(getConf()); }
CacheUpdateMasterWork(Configuration conf, boolean shouldRunPrewarm) { this.shouldRunPrewarm = shouldRunPrewarm; String rawStoreClassName = MetastoreConf.getVar(conf, ConfVars.CACHED_RAW_STORE_IMPL, ObjectStore.class.getName()); try { rawStore = JavaUtils.getClass(rawStoreClassName, RawStore.class).newInstance(); rawStore.setConf(conf); } catch (InstantiationException | IllegalAccessException | MetaException e) { // MetaException here really means ClassNotFound (see the utility method). // So, if any of these happen, that means we can never succeed. throw new RuntimeException("Cannot instantiate " + rawStoreClassName, e); } }
private void setConfInternal(Configuration conf) { String rawStoreClassName = MetastoreConf.getVar(conf, ConfVars.CACHED_RAW_STORE_IMPL, ObjectStore.class.getName()); if (rawStore == null) { try { rawStore = (JavaUtils.getClass(rawStoreClassName, RawStore.class)).newInstance(); } catch (Exception e) { throw new RuntimeException("Cannot instantiate " + rawStoreClassName, e); } } rawStore.setConf(conf); Configuration oldConf = this.conf; this.conf = conf; if (expressionProxy != null && conf != oldConf) { LOG.warn("Unexpected setConf when we were already configured"); } else { expressionProxy = PartFilterExprUtil.createExpressionProxy(conf); } }
/** * Get a cached RawStore. * * @return * @throws MetaException */ private RawStore getMS(boolean reloadConf) throws MetaException { RawStore ms = threadLocalMS.get(); if (ms == null) { LOG.info(addPrefix("Opening raw store with implemenation class:" + rawStoreClassName)); ms = (RawStore) ReflectionUtils.newInstance(getClass(rawStoreClassName, RawStore.class), getConf()); threadLocalMS.set(ms); ms = threadLocalMS.get(); } if (reloadConf) { ms.setConf(getConf()); } return ms; }