busbey commented on a change in pull request #921: HBASE-22749: Distributed MOB 
compactions
URL: https://github.com/apache/hbase/pull/921#discussion_r376013305
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobStoreEngine.java
 ##########
 @@ -43,6 +44,13 @@ protected void createStoreFlusher(Configuration conf, 
HStore store) throws IOExc
    */
   @Override
   protected void createCompactor(Configuration conf, HStore store) throws 
IOException {
-    compactor = new DefaultMobStoreCompactor(conf, store);
+    String className =
+        conf.get(MOB_COMPACTOR_CLASS_KEY, 
DefaultMobStoreCompactor.class.getName());
+    try {
+      compactor = ReflectionUtils.instantiateWithCustomCtor(className,
+        new Class[] { Configuration.class, HStore.class }, new Object[] { 
conf, store });
+    } catch (Exception e) {
 
 Review comment:
   This should only be `RuntimeException`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to