From 80a5032ee78619f211b66522b211b47abc509dae Mon Sep 17 00:00:00 2001 From: owenmonn Date: Wed, 29 Jul 2026 17:35:55 +0900 Subject: [PATCH] HIVE-29778: Log the effective user when creating a Hive session handle req.getUsername() is only populated when auth=noSasl, so the log read "user [null]" under Kerberos, LDAP/SASL PLAIN and HTTP transport. Use the resolved userName parameter that is passed to openSession instead. --- .../org/apache/hive/service/cli/thrift/ThriftCLIService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java index ccf576fe50d3..36b781e2dced 100644 --- a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -549,7 +549,7 @@ private SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res throws HiveSQLException, IOException { final String ipAddress = getIpAddress(); - LOG.info("Creating Hive session handle for user [{}] from IP {}", req.getUsername(), ipAddress); + LOG.info("Creating Hive session handle for user [{}] from IP {}", userName, ipAddress); TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION, req.getClient_protocol());