[
https://issues.apache.org/jira/browse/HBASE-7725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573860#comment-13573860
]
Jesse Yates commented on HBASE-7725:
------------------------------------
{quote}
Another alternative, uglier but with more general applicability, is to create
some ID for the operation and pass it to coprocessor methods if they belong to
the same logical operation. If coprocessor has its own context, it can manage
it, for example in a Map.
{quote}
This would be far better managed as a set of attributes attached to a
CompactionRequest. Generally, you aren't going to start a compaction from one
of the generic RegionObserver methods, so its going to be an Endpoint, which
mean another class, so you then need to keep a static Map shared across the
classes.
{quote}
allowing the user to create compaction requests seems more dangerous to me than
having an opaque context/attributes.
{quote}
Sure, but CPs are inherently more dangerous. They are there for you people able
to futz around with the internals and come with no warranty ;) In our use case,
we will probably just subclass the exsiting CompactionRequest and add the
things that I added in the attached patches (v0, v1). I think adding this
subclass would be a reasonable inclusion, at the least in the hbase-examples
module, if not in the standard directories.
> Add generic attributes to CP initiated compaction request AND latch on
> compaction completion
> --------------------------------------------------------------------------------------------
>
> 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.6
>
> Attachments: example.java, hbase-7725_0.94-v0.patch,
> hbase-7725-v0.patch, hbase-7725-v1.patch,
> hbase-7725_with-attributes-0.94-v0.patch,
> hbase-7725_with-attributes-0.94-v1.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