You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/05/06 02:51:04 UTC

[GitHub] [hbase] binlijin commented on a change in pull request #1588: HBASE-24262 Improvement update_config for PressureAwareCompactionThroughputController

binlijin commented on a change in pull request #1588:
URL: https://github.com/apache/hbase/pull/1588#discussion_r420518128



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/CompactionThroughputControllerFactory.java
##########
@@ -47,24 +53,35 @@ private CompactionThroughputControllerFactory() {
 
   public static ThroughputController create(RegionServerServices server,
       Configuration conf) {
-    Class<? extends ThroughputController> clazz = getThroughputControllerClass(conf);
-    ThroughputController controller = ReflectionUtils.newInstance(clazz, conf);
-    controller.setup(server);
+    Class<? extends ThroughputController> clazz =
+        getThroughputControllerClass(conf);
+    ThroughputController controller = controllerMap.get(clazz);
+    if (controller == null) {
+      controller = ReflectionUtils.newInstance(clazz, conf);
+      controller.setup(server);
+      controllerMap.put(clazz, controller);
+    } else {

Review comment:
       why change it into this?

##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/OffPeakHours.java
##########
@@ -87,6 +87,7 @@ private static boolean isValidHour(int hour) {
     OffPeakHoursImpl(int startHour, int endHour) {
       this.startHour = startHour;
       this.endHour = endHour;
+      LOG.info(this.toString());

Review comment:
       The log is not good, do not have info about the region.




----------------------------------------------------------------
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:
users@infra.apache.org