Apache9 edited a comment on pull request #3721:
URL: https://github.com/apache/hbase/pull/3721#issuecomment-933571085


   In general I do not like that we introduce a new init method but do not call 
it when verifying...
   
   I think we should try to provide more things when constructing the 
StoreFileTracker. The current implementations are already lazy enough as we do 
not actually touch the storage, we just create some in memory objects...
   
   So why not just pass in a RegionFileSystem for this case? Just like what we 
have done in the split/merge procedures.
   ```
     /**
      * Used at master side when splitting/merging regions, as we do not have a 
Store, thus no
      * StoreContext at master side.
      */
     public static StoreFileTracker create(Configuration conf, TableDescriptor 
td,
       ColumnFamilyDescriptor cfd, HRegionFileSystem regionFs) {
       StoreContext ctx =
         
StoreContext.getBuilder().withColumnFamilyDescriptor(cfd).withRegionFileSystem(regionFs)
           
.withFamilyStoreDirectoryPath(regionFs.getStoreDir(cfd.getNameAsString())).build();
       return StoreFileTrackerFactory.create(mergeConfigurations(conf, td, 
cfd), true, ctx);
     }
   ```
   
   Thanks.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to