[
https://issues.apache.org/jira/browse/HBASE-7725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569327#comment-13569327
]
Ted Yu commented on HBASE-7725:
-------------------------------
{code}
+ public synchronized List<CompactionRequest> requestCompaction(final HRegion
r, final String why,
+ final Object attribute) throws IOException {
{code}
Parameter name should be attributes, right ?
Would the attributes be String or Map ?
{code}
+ public synchronized List<CompactionRequest> requestCompaction(final HRegion
r, final String why,
+ int p, Object attributes) throws IOException {
+ List<CompactionRequest> requests = new
ArrayList<CompactionRequest>(r.getStores().size());
for(Store s : r.getStores().values()) {
- requestCompaction(r, s, why, p);
+ CompactionRequest cr = requestCompaction(r, s, why, p, null);
{code}
Looks like attributes parameter isn't passed on.
{code}
+ * @return The created {@link CompactionRequest CompactionRequests} or an
empty list if no
+ * compactions were started
* @throws IOException
*/
- public void requestCompaction(final HRegion r, final String why) throws
IOException;
+ public List<CompactionRequest> requestCompaction(final HRegion r, final
String why)
{code}
I think the requests would be queued. So please modify the @return.
It would be nice to put trunk patch on review board.
> Add ability to block on a compaction request for a region
> ---------------------------------------------------------
>
> Key: HBASE-7725
> URL: https://issues.apache.org/jira/browse/HBASE-7725
> Project: HBase
> Issue Type: Bug
> Components: Compaction, Coprocessors, regionserver
> Reporter: Jesse Yates
> Assignee: Jesse Yates
> Fix For: 0.96.0, 0.94.5
>
> Attachments: example.java, hbase-7725_0.94-v0.patch,
> hbase-7725_with-attributes-0.94-v0.patch
>
>
> You can request that a compaction be started, but you can't be sure when that
> compaction request completes. This is a simple update to the
> CompactionRequest interface and the compact-split thread on the RS that
> doesn't actually impact the RS exposed interface.
> This is particularly useful for CPs so they can control starting/running a
> 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