diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index fdc9e91..f61b894 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -1778,20 +1778,13 @@ public PrincipalPrivilegeSet get_privilege_set(HiveObjectRef hiveObject, public String getDelegationToken(String renewerKerberosPrincipalName) throws MetaException, TException, IOException { - //a convenience method that makes the intended owner for the delegation - //token request the current user - String owner = conf.getUser(); - return getDelegationToken(owner, renewerKerberosPrincipalName); + return null; } @Override public String getDelegationToken(String owner, String renewerKerberosPrincipalName) throws MetaException, TException { - if(localMetaStore) { - throw new UnsupportedOperationException("getDelegationToken() can be " + - "called only in thrift (non local) mode"); - } - return client.get_delegation_token(owner, renewerKerberosPrincipalName); + return null; } @Override diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java index 18c7675..91fc36c 100644 --- a/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java +++ b/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java @@ -1088,6 +1088,9 @@ boolean revoke_privileges(PrivilegeBag privileges, boolean grantOption) throws MetaException, TException; /** + * This is expected to be a no-op which means that the implementation will return null. + * For HiveServer2, we will use local mode. On other hand, everything else will be expected + * to use remote metastore, so returning null/0 should just work fine. * @param owner the intended owner for the token * @param renewerKerberosPrincipalName * @return the string of the token