hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
Date Wed, 22 Feb 2017 21:24:44 GMT

    [ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15879265#comment-15879265

stack commented on HBASE-17312:

+1 This is excellent cleanup. A few small things in rb that can go in on commit.

> [JDK8] Use default method for Observer Coprocessors
> ---------------------------------------------------
>                 Key: HBASE-17312
>                 URL: https://issues.apache.org/jira/browse/HBASE-17312
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>    Affects Versions: 2.0.0
>            Reporter: Guanghao Zhang
>            Assignee: Appy
>              Labels: incompatible
>         Attachments: HBASE-17312.master.001.patch, HBASE-17312.master.001.patch, HBASE-17312.master.002.patch
> In cases where one might need to use multiple observers, say region, master and regionserver;
and the fact that only one class can be extended, it gives rise to following pattern:
> {noformat}
>     public class BaseMasterAndRegionObserver
>       extends BaseRegionObserver
>       implements MasterObserver
>     class AccessController
>       extends BaseMasterAndRegionObserver
>       implements RegionServerObserver
> {noformat}
> were BaseMasterAndRegionObserver is full copy of BaseMasterObserver.
>  There is an example of simple case too where the current design fails.
>  Say only one observer is needed by the coprocessor, but the design doesn't permit extending
even that single observer (see RSGroupAdminEndpoint), that leads to full copy of Base...Observer
class into coprocessor class leading to 1000s of lines of code and this ugly mix of 5 main
functions with 100 useless functions.

This message was sent by Atlassian JIRA

View raw message