Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (revision 5bf5d1400e16cc7028fd1c16399e5a74d3fd1b3c) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (revision 688c749716bdd120c7f9ecb3d7293074450b1213) @@ -314,6 +314,13 @@ return getInternal(c, false, true, doRegisterAllFns); } + /** + * Same as {@link #get(HiveConf)}, except that it does not register all functions. + */ + public static Hive getWithoutRegisterAllFns(HiveConf c) throws HiveException { + return getInternal(c, false, false, false); + } + private static Hive getInternal(HiveConf c, boolean needsRefresh, boolean isFastCheck, boolean doRegisterAllFns) throws HiveException { Hive db = hiveDB.get(); Index: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (revision 5bf5d1400e16cc7028fd1c16399e5a74d3fd1b3c) +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (revision 688c749716bdd120c7f9ecb3d7293074450b1213) @@ -971,7 +971,7 @@ authorizerV2.applyAuthorizationConfigPolicy(sessionConf); // update config in Hive thread local as well and init the metastore client try { - Hive.get(sessionConf).getMSC(); + Hive.getWithoutRegisterAllFns(sessionConf).getMSC(); } catch (Exception e) { // catch-all due to some exec time dependencies on session state // that would cause ClassNoFoundException otherwise