saintstack commented on a change in pull request #958: HBASE-23584 : Descrease 
rpc getFileStatus count when open a storefile
URL: https://github.com/apache/hbase/pull/958#discussion_r361073454
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileInfo.java
 ##########
 @@ -386,23 +391,27 @@ public FileStatus getReferencedFileStatus(final 
FileSystem fs) throws IOExceptio
       } else {
         // HFile Reference
         Path referencePath = getReferredToFile(this.getPath());
-        status = fs.getFileStatus(referencePath);
+        this.localStatus = fs.getFileStatus(referencePath);
+        status = this.localStatus;
       }
     } else {
       if (this.link != null) {
         FileNotFoundException exToThrow = null;
         for (int i = 0; i < this.link.getLocations().length; i++) {
           // HFileLink
           try {
-            return link.getFileStatus(fs);
+            this.localStatus = link.getFileStatus(fs);
+            status = this.localStatus;
+            return status;
           } catch (FileNotFoundException ex) {
             // try the other location
             exToThrow = ex;
           }
         }
         throw exToThrow;
       } else {
-        status = fs.getFileStatus(initialPath);
+        this.localStatus = fs.getFileStatus(initialPath);
+        status = this.localStatus;
 
 Review comment:
   Three times.

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