Github user kavinderd commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1075#discussion_r95034235
  
    --- Diff: 
pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/SecuredHDFS.java
 ---
    @@ -53,6 +53,10 @@
         public static void verifyToken(ProtocolData protData, ServletContext 
context) {
             try {
                 if (UserGroupInformation.isSecurityEnabled()) {
    +                UserGroupInformation loginUser = 
UserGroupInformation.getLoginUser();
    +                if (!loginUser.hasKerberosCredentials()) {
    +                    SecureLogin.login();
    --- End diff --
    
    Instead of `SecureLogin` we can just directly use 
`UserGroupInformation.getLoginUser().reloginFromKeytab()` seems more 
lightweight since it leverages all the kerberos information that's already in 
memory


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to