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 2021/03/02 12:12:55 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #2982: HBASE-25603 Add switch for compaction after bulkload

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



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -7025,19 +7025,23 @@ String prepareBulkLoad(byte[] family, String srcPath, boolean copyFile)
       }
 
       isSuccessful = true;
-      //request compaction
-      familyWithFinalPath.keySet().forEach(family -> {
-        HStore store = getStore(family);
-        try {
-          if (this.rsServices != null && store.needsCompaction()) {
-            this.rsServices.getCompactionRequestor().requestCompaction(this, store,
-              "bulkload hfiles request compaction", Store.PRIORITY_USER + 1,
-              CompactionLifeCycleTracker.DUMMY, null);
+      if (conf.getBoolean(HConstants.COMPACTION_AFTER_BULKLOAD_ENABLE, false)) {

Review comment:
       I agree with @wchevreuil that we'd better keep the old behavior by default, at least on branch-2. We could file a new issue to change it to false on master branch. WDYT?

##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
##########
@@ -322,6 +322,10 @@
   public static final String MAJOR_COMPACTION_JITTER = "hbase.hregion.majorcompaction.jitter";
   public static final float  DEFAULT_MAJOR_COMPACTION_JITTER = 0.50F;
 
+  /** Parameter name for compaction after bulkload */
+  public static final String COMPACTION_AFTER_BULKLOAD_ENABLE =

Review comment:
       Is it possible to add this constants to another place? HConstants is already overloaded...




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