drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppadma <...@git.apache.org>
Subject [GitHub] drill pull request #652: DRILL-4990:Use new HDFS API access instead of listS...
Date Tue, 15 Nov 2016 19:43:57 GMT
Github user ppadma commented on a diff in the pull request:

    https://github.com/apache/drill/pull/652#discussion_r88097089
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
---
    @@ -151,15 +152,11 @@ public WorkspaceSchemaFactory(
       public boolean accessible(final String userName) throws IOException {
         final FileSystem fs = ImpersonationUtil.createFileSystem(userName, fsConf);
         try {
    -      // We have to rely on the listStatus as a FileSystem can have complicated controls
such as regular unix style
    -      // permissions, Access Control Lists (ACLs) or Access Control Expressions (ACE).
Hadoop 2.7 version of FileSystem
    -      // has a limited private API (FileSystem.access) to check the permissions directly
    -      // (see https://issues.apache.org/jira/browse/HDFS-6570). Drill currently relies
on Hadoop 2.5.0 version of
    -      // FileClient. TODO: Update this when DRILL-3749 is fixed.
    -      fs.listStatus(wsPath);
    +      fs.access(wsPath, FsAction.READ);
         } catch (final UnsupportedOperationException e) {
    -      logger.trace("The filesystem for this workspace does not support this operation.",
e);
    +      logger.debug("The filesystem for this workspace does not support this operation.",
e);
    --- End diff --
    
    I am not returning false to be consistent with the existing behavior.  If the user does
not have permission, we fail when we try to read the file during execution. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message