umamaheswararao commented on a change in pull request #1639:
URL: https://github.com/apache/hive/pull/1639#discussion_r516928475



##########
File path: 
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
##########
@@ -1236,13 +1236,35 @@ public boolean isPathEncrypted(Path path) throws 
IOException {
       } else {
         fullPath = path.getFileSystem(conf).makeQualified(path);
       }
-      if(!"hdfs".equalsIgnoreCase(path.toUri().getScheme())) {
+      if (!isFileInHdfs(path.getFileSystem(conf), path)) {
         return false;
       }
 
       return (getEncryptionZoneForPath(fullPath) != null);
     }
 
+    /**
+     * Returns true if the given fs supports mount functionality. In general we
+     * can have child file systems only in the case of mount fs like
+     * ViewFileSystem, ViewFsOverloadScheme or ViewDistributedFileSystem.
+     * Returns false if the getChildFileSystems API returns null.
+     */
+    private boolean isMountedFs(FileSystem fs) {
+      return fs.getChildFileSystems() != null;
+    }
+
+    private boolean isFileInHdfs(FileSystem fs, Path path) throws IOException {
+      String hdfsScheme = "hdfs";
+      boolean isHdfs = hdfsScheme.equalsIgnoreCase(path.toUri().getScheme());

Review comment:
       @yongzhi Thanks for taking a look. yes, we have implemented 
ViewDistributedFileSystem and ViewFsOverloadScheme in hadoop. They both 
supports hdfs paths can be mounted with other fs. You can see in the 
description and traces that hdfs paths pointing to o3fs paths.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to