Apache9 commented on a change in pull request #3721:
URL: https://github.com/apache/hbase/pull/3721#discussion_r725002420



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerFactory.java
##########
@@ -158,12 +166,12 @@ static StoreFileTrackerBase 
createForMigration(Configuration conf, String config
     return ReflectionUtils.newInstance(tracker, conf, isPrimaryReplica, ctx);
   }
 
-  public static void persistTrackerConfig(Configuration conf, 
TableDescriptorBuilder builder) {
+  public static void updateDescriptor(Configuration conf, 
TableDescriptorBuilder builder) {
     TableDescriptor tableDescriptor = builder.build();
     ColumnFamilyDescriptor cfDesc = tableDescriptor.getColumnFamilies()[0];
     StoreContext context = 
StoreContext.getBuilder().withColumnFamilyDescriptor(cfDesc).build();
-    StoreFileTracker tracker = StoreFileTrackerFactory.create(conf, true, 
context);
-    tracker.persistConfiguration(builder);
+    StoreFileTracker tracker = StoreFileTrackerFactory.getInstance(conf, true, 
context);

Review comment:
       Then I think we could just add the if already set check here? And we can 
make this method accept a TableDescriptor instead of a TableDescriptor builder, 
and also return a TableDescriptor. If we found out that the TableDescriptor 
already has the tracker config, then we just return the TableDescriptor itself. 
If not, we initialize the StoreFileTracker and add its configs to the 
TableDescriptor, by creating a TableDescriptorBuilder and return the newly 
built TableDescriptor.




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