wchevreuil commented on a change in pull request #3617:
URL: https://github.com/apache/hbase/pull/3617#discussion_r695018956



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerFactory.java
##########
@@ -17,19 +17,34 @@
  */
 package org.apache.hadoop.hbase.regionserver.storefiletracker;
 
+import static 
org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTracker.STORE_FILE_TRACKER;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.regionserver.StoreContext;
+import org.apache.hadoop.hbase.util.ReflectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Factory method for creating store file tracker.
  */
 @InterfaceAudience.Private
 public final class StoreFileTrackerFactory {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(StoreFileTrackerFactory.class);
+
   public static StoreFileTracker create(Configuration conf, TableName 
tableName,
-    boolean isPrimaryReplica, StoreContext ctx) {
-    return new DefaultStoreFileTracker(conf, tableName, isPrimaryReplica, ctx);
+      boolean isPrimaryReplica, StoreContext ctx) {
+    String className = conf.get(STORE_FILE_TRACKER, 
DefaultStoreFileTracker.class.getName());
+    try {
+      LOG.info("instantiating StoreFileTracker impl {}", className);
+      return ReflectionUtils.instantiateWithCustomCtor(className,

Review comment:
       Yes, I think you mean `ReflectionUtils.newInstance`.




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