[
https://issues.apache.org/jira/browse/HBASE-8683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13677819#comment-13677819
]
Jerry He commented on HBASE-8683:
---------------------------------
I was thinking this would be an user triggered compaction request, similar to a
request coming from HBaseAdmin.
We set the PRIORITY_USER in there. Without it, it is NO_PRIORITY.
The behavior/priority is a little different in the server compaction code based
on this.
For example, we have this in RatioBasedCompactionPolicy:
{code}
// Force a major compaction if this is a user-requested major compaction,
// or if we do not have too many files to compact and this was requested
// as a major compaction.
// Or, if there are any references among the candidates.
boolean majorCompaction = (
(forceMajor && isUserCompaction)
|| ((forceMajor || isMajorCompaction(candidateSelection))
&& (candidateSelection.size() < comConf.getMaxFilesToCompact()))
|| StoreUtils.hasReferences(candidateSelection)
);
{code}
> Add major compaction support in CompactionTool
> ----------------------------------------------
>
> Key: HBASE-8683
> URL: https://issues.apache.org/jira/browse/HBASE-8683
> Project: HBase
> Issue Type: Improvement
> Components: Compaction
> Affects Versions: 0.94.8
> Reporter: Jerry He
> Assignee: Jerry He
> Priority: Minor
> Fix For: 0.95.2, 0.94.9
>
> Attachments: HBASE-8683-0.94.patch, HBASE-8683-trunk.patch
>
>
> Support request for a major compaction in CompactionTool so that we'll make
> this nice tool complete and consistent with the other compaction command and
> API.
> After the patch, here is the usage:
> Usage: java org.apache.hadoop.hbase.regionserver.CompactionTool \
> [-compactOnce] *[-major]* [-mapred] [-D<property=value>]* files...
> Options:
> mapred Use MapReduce to run compaction.
> compactOnce Execute just one compaction step. (default: while needed)
> *major Trigger major compaction.*
> ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira