CCweixiao commented on code in PR #5589:
URL: https://github.com/apache/hbase/pull/5589#discussion_r1446924057
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/StripeCompactionPolicy.java:
##########
@@ -125,6 +125,21 @@ public StripeCompactionRequest
selectCompaction(StripeInformationProvider si,
return request;
}
+ if (forceMajor && isUserCompaction) {
+ if (allFiles == null || allFiles.isEmpty()) {
+ LOG.debug("There is no store file to force a major compaction.");
+ return null;
+ }
+ LOG.debug("The user enforces a major compaction; compacting all files");
+ long targetKvs = estimateTargetKvs(allFiles,
config.getInitialCount()).getFirst();
+ SplitStripeCompactionRequest request =
Review Comment:
> Will this break the stripe assumption, for example, size based stripe?
Anyway, I'm not very familiar with stripe compaction...
Probably not, the logic of the forced major compact of the whole region
reuses the compact logic of the reference Hfile, I tested it and found that
after major compact, one file is generated in each Stripe, and the number of
files is basically the same as the initialized stripe count, and the file size
under each Stripe is also relatively average
--
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]