openinx commented on a change in pull request #163: HBASE-21995 Add a 
coprocessor to set HDFS ACL for hbase granted user
URL: https://github.com/apache/hbase/pull/163#discussion_r296127402
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java
 ##########
 @@ -405,14 +404,44 @@ public Path getAvailablePath(FileSystem fs) throws 
IOException {
    * @throws IOException on unexpected error.
    */
   public FileStatus getFileStatus(FileSystem fs) throws IOException {
+    IOException exception = null;
     for (int i = 0; i < locations.length; ++i) {
       try {
         return fs.getFileStatus(locations[i]);
-      } catch (FileNotFoundException e) {
-        // Try another file location
+      } catch (FileNotFoundException | AccessControlException e) {
+        exception = handleAccessLocationException(this, e, exception);
       }
     }
-    throw new FileNotFoundException("Unable to open link: " + this);
+    throw exception;
+  }
+
+  /**
+   * Handle exceptions which are threw when access locations of file link
 
 Review comment:
   I think you need to explain this in comment: 
   1. how we handle FileNotFoundException ?  why ? 
   2. how we handle the AccessControlException  ? why ? 

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to