yanghua commented on a change in pull request #10891: 
[FLINK-15561][Security][hotfix] Add Delegation Token checker in 
YarnClusterDescriptor
URL: https://github.com/apache/flink/pull/10891#discussion_r368403224
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
 ##########
 @@ -435,9 +436,13 @@ public void killCluster(ApplicationId applicationId) 
throws FlinkException {
                        UserGroupInformation loginUser = 
UserGroupInformation.getCurrentUser();
                        if (loginUser.getAuthenticationMethod() == 
UserGroupInformation.AuthenticationMethod.KERBEROS
                                        && useTicketCache && 
!loginUser.hasKerberosCredentials()) {
-                               LOG.error("Hadoop security with Kerberos is 
enabled but the login user does not have Kerberos credentials");
-                               throw new RuntimeException("Hadoop security 
with Kerberos is enabled but the login user " +
+                               // a delegation token is an adequate substitute 
in most cases
 
 Review comment:
   You added a stricter condition to the exception identification. Comparing 
with the origin logic, if it does not meet the conditions you added, the 
original exception will not be logged and thrown. Is this what you expected? In 
addition, if you just want to identify the exception more strictly, why not add 
it to the outer if block together?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to