You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/20 07:44:25 UTC

[GitHub] [hbase] sandeepvinayak opened a new pull request #856: Optimizing calls to setStoragePolicy

sandeepvinayak opened a new pull request #856: Optimizing calls to setStoragePolicy
URL: https://github.com/apache/hbase/pull/856
 
 
   In CommonFSUtils's ` invokeSetStoragePolicy(final FileSystem fs, final Path path,
         final String storagePolicy)`, we invoke the setStoragePolicy by the following:
   
   ```java
   m = fs.getClass().getDeclaredMethod("setStoragePolicy",
           new Class<?>[] { Path.class, String.class });
   ...
   m.invoke(fs, path, storagePolicy);
   ```
   
   When the call is initiated by HRegionFileSystem and fs is HFileSystem, `m.invoke(fs, path, storagePolicy)`repeats the same function call `setStoragePolicy(final FileSystem fs, final Path path,
         final String storagePolicy)` with underneath file system. 
   
   We can avoid this duplicate calls by checking in advance if the file system for HRegionFileSystem is HFileSystem call the setStoragePolicy with the underneath fs. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services