zhengchenyu commented on code in PR #25428:
URL: https://github.com/apache/flink/pull/25428#discussion_r1800525208
##########
flink-connectors/flink-connector-hive/src/main/resources/META-INF/services/org.apache.hadoop.security.token.TokenIdentifier:
##########
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
Review Comment:
After fix renewer user, still throw exception like below:
```
2024-09-26 14:35:07,144 ERROR
org.apache.flink.table.security.token.HiveServer2DelegationTokenProvider [] -
Failed to obtain delegation token for HiveServer2
java.lang.NullPointerException: null
at
org.apache.flink.table.security.token.HiveServer2DelegationTokenProvider.getTokenRenewalInterval(HiveServer2DelegationTokenProvider.java:202)
~[flink-sql-connector-hive-3.1.3_2.12-1.19.1.jar:1.19.1]
at
org.apache.flink.table.security.token.HiveServer2DelegationTokenProvider.lambda$obtainDelegationTokens$0(HiveServer2DelegationTokenProvider.java:170)
~[flink-sql-connector-hive-3.1.3_2.12-1.19.1.jar:1.19.1]
...
```
I found
[tokenIdentifier](https://github.com/apache/flink/blob/da393c92db814803c9ac96c6cdd55ae444c43689/flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/security/token/HiveServer2DelegationTokenProvider.java#L149C70-L149C85)
is null. Through further debugging, I found
HiveServer2DelegationTokenIdentifier is not in services file, then
org.apache.hadoop.security.token.Token::getClassForIdentifier can not recognize
the kind `HIVE_DELEGATION_TOKEN`, then hive2Token.decodeIdentifier() will
return null.
--
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]