zhouyifan279 commented on code in PR #6955:
URL: https://github.com/apache/iceberg/pull/6955#discussion_r1127380059
##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveHadoopUtil.java:
##########
@@ -31,7 +31,12 @@ private HiveHadoopUtil() {}
public static String currentUser() {
try {
- return UserGroupInformation.getCurrentUser().getUserName();
+ String username =
UserGroupInformation.getCurrentUser().getShortUserName();
+ if (username != null) {
+ return username;
+ } else {
+ throw new IOException("Hadoop user is null");
Review Comment:
OK
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]