diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java index 41385f7..9a4c61a 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java @@ -1647,7 +1647,7 @@ public static boolean isView(Table table) { } for (int i = 0; i < parameterTypes.length; i++) { Class clazz = parameterTypes[i]; - if (!(clazz.isInstance(initargs[i]))) { + if (initargs[i] != null && !(clazz.isInstance(initargs[i]))) { throw new IllegalArgumentException("Object : " + initargs[i] + " is not an instance of " + clazz); } diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java index f0bd438..96d8248 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java @@ -84,8 +84,8 @@ protected RetryingMetaStoreClient(HiveConf hiveConf, Class[] constructorArgTy public static IMetaStoreClient getProxy( HiveConf hiveConf, boolean allowEmbedded) throws MetaException { - return getProxy(hiveConf, new Class[]{HiveConf.class, Boolean.class}, - new Object[]{hiveConf, allowEmbedded}, null, HiveMetaStoreClient.class.getName() + return getProxy(hiveConf, new Class[]{HiveConf.class, HiveMetaHookLoader.class, Boolean.class}, + new Object[]{hiveConf, null, allowEmbedded}, null, HiveMetaStoreClient.class.getName() ); }