For #3 below, have you seen the following code in HRegion#doClose() ?
if (coprocessorHost != null) {
status.setStatus("Running coprocessor pre-close hooks");
this.coprocessorHost.preClose(abort);
}
Cheers
On Wed, Jul 24, 2013 at 8:31 PM, Vladimir Rodionov
<[email protected]>wrote:
> On design:
>
> Why is the instance per region if we specify region in every call to
> RegionObserver anyway( through RegionCoprocessorEnvironment)? The
> coprocessor instance is attached to every table region and
> receives the very same region as a parameter of every call except
> start/stop?
>
> I want one coprocessor instance per RegionServer->Table or I want one
> Instance per RegionServer. Its not feasible currently?
>
> On implementation:
> 1. stop() is always called after postClose - this one I tested
> 2. start() is always called before preOpen() ?
>
> OK. this is annoying. The contract of start/stop becomes unclear. I though
> that we start should be called on coprocessor load and
> stop - on RS shutdown.
>
> 3. abortRequested parameter is always false. Yes, its for testing but how
> can I distinguish disabling table and RS shutdown?
>
> 4. How can I intercept (or get notified on) RS shutdown request from
> inside a coprocessor?
>
> and the last one:
>
> 5. I have one table and one region - hence one coprocessor instance. When
> I disable table I observe the following sequence of calls:
>
> preClose
> preClose
> preClose
> postClose
> stop
>
> preClose is called three times in row. Is it feature or a bug?
>
> This was tested with MiniHBaseCluster. Hbase 0.94.6.1
>
> Best regards,
> Vladimir Rodionov
> Principal Platform Engineer
> Carrier IQ, www.carrieriq.com
> e-mail: [email protected]
>
> Confidentiality Notice: The information contained in this message,
> including any attachments hereto, may be confidential and is intended to be
> read only by the individual or entity to whom this message is addressed. If
> the reader of this message is not the intended recipient or an agent or
> designee of the intended recipient, please note that any review, use,
> disclosure or distribution of this message or its attachments, in any form,
> is strictly prohibited. If you have received this message in error, please
> immediately notify the sender and/or [email protected] and
> delete or destroy any copy of this message and its attachments.
>