wchevreuil commented on pull request #3721:
URL: https://github.com/apache/hbase/pull/3721#issuecomment-933592090


   > In general I do not like that we introduce a new init method but do not 
call it when verifying...
   
   It's a mean to separate instantiation of SFT impls, from actual init logic. 
In this particular case, we need SFT impl specific logic about setting configs 
before we can effectively start a SFT tracker properly. 
   
   > 
   > 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.
   
   We don't have store info at CreateTable procedure time, we don't even have 
the regions yet by then, so how can we create a RegionFileSystem? 


-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to