This is an automated email from the ASF dual-hosted git repository. ayushsaxena pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new c65aae31b80 HIVE-27564: Add log for ZooKeeperTokenStore to trace the lifecycle of tokenPath (#4548). (lvyanquan, reviewed by Ayush Saxena) c65aae31b80 is described below commit c65aae31b80bd5f479d0dd2d97327557b1adc233 Author: Kunni <1365976...@qq.com> AuthorDate: Sun Sep 17 21:23:17 2023 +0800 HIVE-27564: Add log for ZooKeeperTokenStore to trace the lifecycle of tokenPath (#4548). (lvyanquan, reviewed by Ayush Saxena) --- .../apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java index aa2f0cccffa..2603771784a 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java @@ -437,14 +437,17 @@ public class ZooKeeperTokenStore implements DelegationTokenStore { public boolean removeToken(DelegationTokenIdentifier tokenIdentifier) { String tokenPath = getTokenPath(tokenIdentifier); zkDelete(tokenPath); + LOGGER.info("Removed token: {}", tokenPath); return true; } @Override public DelegationTokenInformation getToken(DelegationTokenIdentifier tokenIdentifier) { - byte[] tokenBytes = zkGetData(getTokenPath(tokenIdentifier)); + String tokenPath = getTokenPath(tokenIdentifier); + byte[] tokenBytes = zkGetData(tokenPath); if(tokenBytes == null) { // The token is already removed. + LOGGER.info("Could not get data from {}", tokenPath); return null; } try {