Github user shivzone commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1075#discussion_r95014877
--- 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 --
We should definitely avoid invoking login() during every rest api request.
SecureUtil.login invokes Configuration.addResource to load pxf-site.xml which
is quite expensive. We should definitely move this to a background thread or
have a different means of checking if verifyToken fails and try login
---
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.
---