[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-17312: -- Hadoop Flags: Incompatible change,Reviewed Marking as incompatible change. > [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 > Fix For: 2.0.0 > > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch, HBASE-17312.master.002.patch, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.4.14#64029)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Release Note: Deletes BaseMasterAndRegionObserver, BaseMasterObserver, BaseRegionObserver, BaseRegionServerObserver and BaseWALObserver. Their corresponding interface classes now use JDK8's 'default' keyword to provide empty/no-op implementations so that: 1. Derived class don't break when more coprocessor hooks are added in future. 2. Derived classes don't have to redundantly override functions they don't care about with empty implementations. Earlier, BaseXXXObserver classes provided these exact two benefits, but with 'default' keyword in JDK8, they are not needed anymore. To fix the breakages because of this change, simply change "Foo extends BaseXXXObserver" to "Foo implements XXXObserver". > [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 > Fix For: 2.0.0 > > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch, HBASE-17312.master.002.patch, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Fix Version/s: (was: 2.0) 2.0.0 > [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 > Fix For: 2.0.0 > > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch, HBASE-17312.master.002.patch, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Resolution: Fixed Status: Resolved (was: Patch Available) > [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 > Fix For: 2.0.0 > > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch, HBASE-17312.master.002.patch, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Fix Version/s: 2.0 > [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 > Fix For: 2.0 > > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch, HBASE-17312.master.002.patch, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Attachment: HBASE-17312.master.006.patch > [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, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.patch, HBASE-17312.master.006.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Attachment: HBASE-17312.master.005.patch > [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, > HBASE-17312.master.003.patch, HBASE-17312.master.004.patch, > HBASE-17312.master.005.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Attachment: HBASE-17312.master.004.patch > [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, > HBASE-17312.master.003.patch, HBASE-17312.master.004.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Attachment: HBASE-17312.master.003.patch > [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, > HBASE-17312.master.003.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Attachment: HBASE-17312.master.002.patch > [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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Labels: incompatible (was: ) > [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 > > > 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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Appy updated HBASE-17312: - Description: 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. was:Use default method in MasterObserver, RegionObserver, RegionServerObserver and WALObserver. And mark the BaseRegionObserver, BaseMasterAndRegionObserver, BaseRegionServerObserver and BaseWALObserver. User can implement the interface directly and will not break compatibility when add new default methods. > [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: Guanghao Zhang > Labels: incompatible > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.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 (v6.3.15#6346)
[jira] [Updated] (HBASE-17312) [JDK8] Use default method for Observer Coprocessors
[ https://issues.apache.org/jira/browse/HBASE-17312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Guanghao Zhang updated HBASE-17312: --- Summary: [JDK8] Use default method for Observer Coprocessors (was: [JDK8] Use default method in XXXObserver) > [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: Guanghao Zhang > Attachments: HBASE-17312.master.001.patch, > HBASE-17312.master.001.patch > > > Use default method in MasterObserver, RegionObserver, RegionServerObserver > and WALObserver. And mark the BaseRegionObserver, > BaseMasterAndRegionObserver, BaseRegionServerObserver and BaseWALObserver. > User can implement the interface directly and will not break compatibility > when add new default methods. -- This message was sent by Atlassian JIRA (v6.3.15#6346)