@Override public void onConfigChange(ConfigChangeEvent changeEvent) throws MetaException { if (changeEvent.getKey().equals(MetastoreConf.ConfVars.CLIENT_SOCKET_TIMEOUT.getVarname()) || changeEvent.getKey().equals(MetastoreConf.ConfVars.CLIENT_SOCKET_TIMEOUT.getHiveName())) { // TODO: this only applies to current thread, so it's not useful at all. Deadline.resetTimeout(MetastoreConf.convertTimeStr(changeEvent.getNewValue(), TimeUnit.SECONDS, TimeUnit.MILLISECONDS)); } } }
String key = tableEvent.getKey(); if (key.equals(ConfVars.EVENT_DB_LISTENER_TTL.toString()) || key.equals(ConfVars.EVENT_DB_LISTENER_TTL.getHiveName())) {
assertEquals("metastore.try.direct.sql", event.getKey()); assertEquals("true", event.getOldValue()); assertEquals("false", event.getNewValue());
@Override public void onConfigChange(ConfigChangeEvent changeEvent) throws MetaException { if (changeEvent.getKey().equals(MetastoreConf.ConfVars.CLIENT_SOCKET_TIMEOUT.getVarname()) || changeEvent.getKey().equals(MetastoreConf.ConfVars.CLIENT_SOCKET_TIMEOUT.getHiveName())) { // TODO: this only applies to current thread, so it's not useful at all. Deadline.resetTimeout(MetastoreConf.convertTimeStr(changeEvent.getNewValue(), TimeUnit.SECONDS, TimeUnit.MILLISECONDS)); } } }
@Override public void onConfigChange(ConfigChangeEvent changeEvent) throws MetaException { if (changeEvent.getKey().equals(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT.varname)) { Deadline.resetTimeout(HiveConf.toTime(changeEvent.getNewValue(), TimeUnit.SECONDS, TimeUnit.MILLISECONDS)); } } }
@Override public void onConfigChange(ConfigChangeEvent changeEvent) throws MetaException { if (changeEvent.getKey().equals(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT.varname)) { Deadline.resetTimeout(HiveConf.toTime(changeEvent.getNewValue(), TimeUnit.SECONDS, TimeUnit.MILLISECONDS)); } } }
/** * @param tableEvent table event. * @throws org.apache.hadoop.hive.metastore.api.MetaException */ public void onConfigChange(ConfigChangeEvent tableEvent) throws MetaException { String key = tableEvent.getKey(); if (key.equals(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL.toString())) { // This weirdness of setting it in our hiveConf and then reading back does two things. // One, it handles the conversion of the TimeUnit. Two, it keeps the value around for // later in case we need it again. hiveConf.set(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL.name(), tableEvent.getNewValue()); cleaner.setTimeToLive(hiveConf.getTimeVar(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL, TimeUnit.SECONDS)); } }
/** * @param tableEvent table event. * @throws org.apache.hadoop.hive.metastore.api.MetaException */ public void onConfigChange(ConfigChangeEvent tableEvent) throws MetaException { String key = tableEvent.getKey(); if (key.equals(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL.toString())) { // This weirdness of setting it in our hiveConf and then reading back does two things. // One, it handles the conversion of the TimeUnit. Two, it keeps the value around for // later in case we need it again. hiveConf.set(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL.name(), tableEvent.getNewValue()); cleaner.setTimeToLive(hiveConf.getTimeVar(HiveConf.ConfVars.METASTORE_EVENT_DB_LISTENER_TTL, TimeUnit.SECONDS)); } }
/** * @param tableEvent table event. * @throws org.apache.hadoop.hive.metastore.api.MetaException */ @Override public void onConfigChange(ConfigChangeEvent tableEvent) throws MetaException { String key = tableEvent.getKey(); if (key.equals(ConfVars.EVENT_DB_LISTENER_TTL.toString()) || key.equals(ConfVars.EVENT_DB_LISTENER_TTL.getHiveName())) { // This weirdness of setting it in our conf and then reading back does two things. // One, it handles the conversion of the TimeUnit. Two, it keeps the value around for // later in case we need it again. long time = MetastoreConf.convertTimeStr(tableEvent.getNewValue(), TimeUnit.SECONDS, TimeUnit.SECONDS); MetastoreConf.setTimeVar(getConf(), MetastoreConf.ConfVars.EVENT_DB_LISTENER_TTL, time, TimeUnit.SECONDS); cleaner.setTimeToLive(MetastoreConf.getTimeVar(getConf(), MetastoreConf.ConfVars.EVENT_DB_LISTENER_TTL, TimeUnit.SECONDS)); } }