hbase-dev mailing list archives

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

             Summary: Use 'default' keyword in Observer interfaces to get rid of 'Base...Observer'
implementations.
                 Key: HBASE-17652
                 URL: https://issues.apache.org/jira/browse/HBASE-17652
             Project: HBase
          Issue Type: Improvement
            Reporter: Appy
            Assignee: Appy


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:

    public class BaseMasterAndRegionObserver
      extends BaseRegionObserver
      implements MasterObserver

    class AccessController
      extends BaseMasterAndRegionObserver
      implements RegionServerObserver

    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 copy of full Bas
    e...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
(v6.3.15#6346)

Mime
View raw message