|
72 | 72 | import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
|
73 | 73 | import org.apache.hadoop.hive.metastore.hooks.URIResolverHook;
|
74 | 74 | import org.apache.hadoop.hive.metastore.partition.spec.PartitionSpecProxy;
|
75 |
| -import org.apache.hadoop.hive.metastore.security.DelegationTokenIdentifier; |
76 | 75 | import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
|
77 | 76 | import org.apache.hadoop.hive.metastore.txn.TxnCommonUtils;
|
78 | 77 | import org.apache.hadoop.hive.metastore.utils.FilterUtils;
|
79 | 78 | import org.apache.hadoop.hive.metastore.utils.JavaUtils;
|
80 | 79 | import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils;
|
81 | 80 | import org.apache.hadoop.hive.metastore.utils.SecurityUtils;
|
82 | 81 | import org.apache.hadoop.security.UserGroupInformation;
|
83 |
| -import org.apache.hadoop.security.token.Token; |
84 |
| -import org.apache.hadoop.security.token.TokenIdentifier; |
85 | 82 | import org.apache.hadoop.util.ReflectionUtils;
|
86 | 83 | import org.apache.hadoop.util.StringUtils;
|
87 | 84 | import org.apache.http.HttpException;
|
@@ -511,22 +508,7 @@ public void reconnect() throws MetaException {
|
511 | 508 | promoteRandomMetaStoreURI();
|
512 | 509 | }
|
513 | 510 |
|
514 |
| - String tokenSig = MetastoreConf.getVar(conf, ConfVars.TOKEN_SIGNATURE); |
515 |
| - try { |
516 |
| - tokenStrForm = SecurityUtils.getTokenStrForm(tokenSig); |
517 |
| - if (tokenStrForm != null) { |
518 |
| - renewDelegationToken(tokenStrForm); |
519 |
| - } else { |
520 |
| - generateProxyUserDelegationToken(); |
521 |
| - } |
522 |
| - } catch (Exception e) { |
523 |
| - LOG.error("Error while setting delegation token while reconnecting.", e); |
524 |
| - if (e instanceof MetaException) { |
525 |
| - throw (MetaException) e; |
526 |
| - } else { |
527 |
| - throw new MetaException(e.getMessage()); |
528 |
| - } |
529 |
| - } |
| 511 | + generateProxyUserDelegationToken(); |
530 | 512 |
|
531 | 513 | open();
|
532 | 514 | }
|
|
0 commit comments