hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Appy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17652) Use 'default' keyword in Coprocessor Observer interfaces to get rid of 'Base...Observer' implementations.
Date Thu, 16 Feb 2017 00:13:41 GMT

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

Appy commented on HBASE-17652:

Ouch. I usually look for existing jiras when starting something, but didn't this time.
There goes time and energy which could have been used in other refactoring.
Will take a look at your patch.

> Use 'default' keyword in Coprocessor Observer interfaces to get rid of 'Base...Observer'
> ---------------------------------------------------------------------------------------------------------
>                 Key: HBASE-17652
>                 URL: https://issues.apache.org/jira/browse/HBASE-17652
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Appy
>            Assignee: Appy
>              Labels: coprocessors, incompatible
>         Attachments: HBASE-17652.master.001.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