Index: shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java =================================================================== --- shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java (revision 1327722) +++ shims/src/test/org/apache/hadoop/hive/thrift/TestHadoop20SAuthBridge.java (working copy) @@ -28,8 +28,6 @@ import java.util.Arrays; import java.util.Enumeration; -import junit.framework.TestCase; - import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; @@ -40,16 +38,8 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.io.Text; -import org.apache.hadoop.security.SaslRpcServer; -import org.apache.hadoop.security.SaslRpcServer.AuthMethod; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod; import org.apache.hadoop.security.authorize.AuthorizationException; -import org.apache.hadoop.security.authorize.ProxyUsers; -import org.apache.hadoop.security.token.SecretManager.InvalidToken; -import org.apache.hadoop.security.token.Token; -import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation; -import org.apache.hadoop.security.token.delegation.DelegationKey; import org.apache.hadoop.util.StringUtils; import org.apache.thrift.transport.TSaslServerTransport; import org.apache.thrift.transport.TTransportException; @@ -312,7 +302,7 @@ clientUgi.getShortUserName().equals(d.getUser().getShortUserName())); if (tokenSig != null) { - conf.set("hive.metastore.token.signature", tokenSig); + conf.set(ConfVars.METASTORE_TOKEN_SIGNATURE, tokenSig); t.setService(new Text(tokenSig)); } //add the token to the clientUgi for securely talking to the metastore Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1327722) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -233,7 +233,7 @@ // this should happen on the map/reduce tasks if the client added the // tokens into hadoop's credential store in the front end during job // submission. - String tokenSig = conf.get("hive.metastore.token.signature"); + String tokenSig = conf.getVar(ConfVars.METASTORE_TOKEN_SIGNATURE); // tokenSig could be null tokenStrForm = shim.getTokenStrForm(tokenSig); Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1327722) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -124,6 +124,7 @@ HiveConf.ConfVars.METASTORE_PART_INHERIT_TBL_PROPS, HiveConf.ConfVars.METASTORE_BATCH_RETRIEVE_TABLE_PARTITION_MAX, HiveConf.ConfVars.METASTORE_PRE_EVENT_LISTENERS, + HiveConf.ConfVars.METASTORE_TOKEN_SIGNATURE, }; /** @@ -268,6 +269,7 @@ METASTORE_KERBEROS_PRINCIPAL("hive.metastore.kerberos.principal", "hive-metastore/_HOST@EXAMPLE.COM"), METASTORE_USE_THRIFT_SASL("hive.metastore.sasl.enabled", false), + METASTORE_TOKEN_SIGNATURE("hive.metastore.token.signature", ""), METASTORE_USE_THRIFT_FRAMED_TRANSPORT("hive.metastore.thrift.framed.transport.enabled", false), METASTORE_CLUSTER_DELEGATION_TOKEN_STORE_CLS( "hive.cluster.delegation.token.store.class",