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



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/storefiletracker/StoreFileTrackerFactory.java
##########
@@ -33,22 +36,82 @@
 
 /**
  * Factory method for creating store file tracker.
+ * <p/>
+ * The current implementations are:
+ * <ul>
+ * <li><em>default</em>: DefaultStoreFileTracker, see {@link 
DefaultStoreFileTracker}.</li>
+ * <li><em>file</em>:FileBasedStoreFileTracker, see {@link 
FileBasedStoreFileTracker}.</li>
+ * <li><em>migration</em>:MigrationStoreFileTracker, see {@link 
MigrationStoreFileTracker}.</li>
+ * </ul>
+ * @see DefaultStoreFileTracker
+ * @see FileBasedStoreFileTracker
+ * @see MigrationStoreFileTracker
  */
[email protected] public final class StoreFileTrackerFactory {
-  public static final String TRACK_IMPL = "hbase.store.file-tracker.impl";
[email protected]
+public final class StoreFileTrackerFactory {
+
   private static final Logger LOG = 
LoggerFactory.getLogger(StoreFileTrackerFactory.class);
 
-  public static Class<? extends StoreFileTracker> 
getStoreFileTrackerImpl(Configuration conf) {
-    return conf.getClass(TRACK_IMPL, DefaultStoreFileTracker.class, 
StoreFileTracker.class);
+  public static final String TRACKER_IMPL = "hbase.store.file-tracker.impl";
+
+  /**
+   * Maps between configuration names for trackers and implementation classes.
+   */
+  public enum Trackers {
+    DEFAULT(DefaultStoreFileTracker.class), 
FILE(FileBasedStoreFileTracker.class),
+    MIGRATION(MigrationStoreFileTracker.class);
+
+    final Class<? extends StoreFileTracker> clazz;
+
+    private Trackers(Class<? extends StoreFileTracker> clazz) {

Review comment:
       OK, seems it is OK to just remove the 'private' modifier...




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