diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java index 5e81e98..6cd63e9 100644 --- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java +++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java @@ -795,9 +795,6 @@ public void clearTestSideEffects() throws Exception { return; } - clearTablesCreatedDuringTests(); - clearKeysCreatedInTests(); - // allocate and initialize a new conf since a test can // modify conf by using 'set' commands conf = new HiveConf(Driver.class); @@ -805,6 +802,9 @@ public void clearTestSideEffects() throws Exception { // renew the metastore since the cluster type is unencrypted db = Hive.get(conf); // propagate new conf to meta store + clearTablesCreatedDuringTests(); + clearKeysCreatedInTests(); + setup.preTest(conf); } diff --git a/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java b/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java index 9a3ba04..9d31b46 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/processors/SetProcessor.java @@ -155,7 +155,7 @@ public static CommandProcessorResponse setVariable( }).substitute(ss.getConf(), varvalue)); } else if (varname.startsWith(METACONF_PREFIX)) { String propName = varname.substring(METACONF_PREFIX.length()); - Hive hive = Hive.get(ss.getConf()); + Hive hive = Hive.get(new HiveConf(ss.getConf())); hive.setMetaConf(propName, new VariableSubstitution(new HiveVariableSource() { @Override public Map getHiveVariable() { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java index 70b2bc0..97e4964 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java @@ -527,7 +527,7 @@ private static void start(SessionState startSs, boolean isAsync, LogHelper conso // Hive object instance should be created with a copy of the conf object. If the conf is // shared with SessionState, other parts of the code might update the config, but // Hive.get(HiveConf) would not recognize the case when it needs refreshing - Hive.get(new HiveConf(startSs.conf)).getMSC(); + Hive.get(new HiveConf(startSs.conf)); UserGroupInformation sessionUGI = Utils.getUGI(); FileSystem.get(startSs.conf); @@ -553,10 +553,6 @@ private static void start(SessionState startSs, boolean isAsync, LogHelper conso } } catch (RuntimeException e) { throw e; - } catch (Hive.SchemaException e) { - RuntimeException ex = new RuntimeException(e.getMessage()); - ex.setStackTrace(new StackTraceElement[0]); - throw ex; } catch (Exception e) { // Catch-all due to some exec time dependencies on session state // that would cause ClassNoFoundException otherwise