gengliangwang commented on code in PR #46450: URL: https://github.com/apache/spark/pull/46450#discussion_r1594846382
########## sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java: ########## @@ -285,9 +288,10 @@ public String verifyDelegationToken(String delegationToken) throws HiveSQLExcept try { return delegationTokenManager.verifyDelegationToken(delegationToken); } catch (IOException e) { - String msg = "Error verifying delegation token " + delegationToken; - LOG.error(msg, e); - throw new HiveSQLException(msg, "08S01", e); + LOG.error("Error verifying delegation token {}", e, + MDC.of(LogKeys.TOKEN$.MODULE$, delegationToken)); + throw new HiveSQLException("Error verifying delegation token " + delegationToken, Review Comment: nit: we can store the log entry into `msg` and use `msg.message` here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org