[
https://issues.apache.org/jira/browse/HBASE-3842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027498#comment-13027498
]
Nicolas Spiegelberg commented on HBASE-3842:
--------------------------------------------
Talked a little with Gary Helmling about this. The main points are:
1. Selection of files for compaction will be decoupled from the actual
compaction/merge itself
2. Splits will be completely decoupled from compactions
3. Since we're making all these changes, it would be nice to add the ability to
short-circuit & instead use custom compaction algorithms.
Here is an initial proposal for the new API.
{code}
/* Called before selecting what files to compact. An sorted candidate set for
compaction is given and the compaction algorithm will use the remaining
contents of the candidate set (after coprocessor) as input to the compaction
algorithm.
*
* @param candidates : a mutable copy of StoreFile candidates for this Store.
add/remove within the coprocessor will affect the candidate set
* @return true to skip default selection algorithm and use all files still in
candidates
*/
boolean preCompactSelection(byte[] store, List<StoreFile> candidates);
// @param candidates : StoreFiles in this compaction
// @return if not null, assumes a custom compaction algorithm was used and adds
resulting StoreFiles to the Store
List<StoreFile> preCompaction(byte[] store, ImmutableList<StoreFile>
candidates);
// @param newFiles : StoreFiles made by this compaction
void postCompaction(byte[] store, List<StoreFile> newFiles);
{code}
> Refactor Coprocessor Compaction API
> -----------------------------------
>
> Key: HBASE-3842
> URL: https://issues.apache.org/jira/browse/HBASE-3842
> Project: HBase
> Issue Type: Improvement
> Components: coprocessors, regionserver
> Affects Versions: 0.92.0
> Reporter: Nicolas Spiegelberg
> Assignee: Nicolas Spiegelberg
> Priority: Minor
> Labels: compaction
> Fix For: 0.92.0
>
>
> After HBASE-3797, the compaction logic flow has been significantly altered.
> Because of this, the current compaction coprocessor API is insufficient for
> gaining full insight into compaction requests/results. Refactor coprocessor
> API after HBASE-3797 is committed to be more extensible and increase
> visibility.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira