Apache9 commented on a change in pull request #4111:
URL: https://github.com/apache/hbase/pull/4111#discussion_r809972055
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegionFactory.java
##########
@@ -89,10 +94,23 @@
.setDataBlockEncoding(DataBlockEncoding.ROW_INDEX_V1).build())
.setColumnFamily(ColumnFamilyDescriptorBuilder.of(PROC_FAMILY)).build();
+ private static TableDescriptor withTrackerConfigs(Configuration conf) {
+ String trackerImpl = conf.get(TRACKER_IMPL,
conf.get(StoreFileTrackerFactory.TRACKER_IMPL,
+ StoreFileTrackerFactory.Trackers.DEFAULT.name()));
+ Class<? extends StoreFileTracker> trackerClass =
+ StoreFileTrackerFactory.getTrackerClass(trackerImpl);
+ if (StoreFileTrackerFactory.isMigration(trackerClass)) {
+ throw new IllegalArgumentException("Should not set store file tracker to
" +
+ StoreFileTrackerFactory.Trackers.MIGRATION.name() + " for master local
region");
+ }
+ StoreFileTracker tracker = ReflectionUtils.newInstance(trackerClass, conf,
true, null);
+ return
tracker.updateWithTrackerConfigs(TableDescriptorBuilder.newBuilder(TABLE_DESC)).build();
+ }
Review comment:
It is is a bit different here. In other SFT related classes, we all
follow the same pattern to construct a new Configuration instance with
TableDescriptor and ColumnFamilyDescriptor, i.e, we need to process per family,
not only per table. But here, we know that we do not have SFT related
configurations in TableDescriptor and ColumnFamilyDescriptor, we just want to
add one to the TableDescriptor, so I copied part of the code here and modified
it accordingly.
--
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]