You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2017/11/07 22:02:00 UTC

[jira] [Commented] (HBASE-17730) Migration to 2.0 for coprocessors

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

Mike Drob commented on HBASE-17730:
-----------------------------------

Recording some upgrade experience here for future inclusion in the docs... Was helping a user migrate from HBase 1.2 coprocessors to HBase 2.0 coprocessors and they had {{extends BaseRegionObserver}} before. Initially, we tried changing that to {{implements RegionObserver, Coprocessor}} based on the original interfaces in 1.2

Later we figured out that we need to both {{implements RegionObserver, RegionCoprocessor}} and add the method
{code}
  @Override
  public Optional<RegionObserver> getRegionObserver() {
    return Optional.of(this);
  }
{code}

After that, it seems like everything is working as it was before. Should have notes like this in the eventual migration guide.

> Migration to 2.0 for coprocessors 
> ----------------------------------
>
>                 Key: HBASE-17730
>                 URL: https://issues.apache.org/jira/browse/HBASE-17730
>             Project: HBase
>          Issue Type: Sub-task
>          Components: documentation, migration
>            Reporter: Appy
>            Priority: Blocker
>             Fix For: 2.0.0-beta-1
>
>
> Jiras breaking coprocessor compatibility should be marked with component ' Coprocessor', and label 'incompatible'.
> Close to releasing 2.0, we should go through all such jiras and write down steps for migrating coprocessor easily.
> The idea is, it might be very hard to fix coprocessor breakages by reverse engineering errors,  but will be easier we suggest easiest way to fix breakages resulting from each individual incompatible change.
> For eg. HBASE-17312 is incompatible change. It'll result in 100s of errors because BaseXXXObserver classes are gone and will probably result in a lot of confusion, but if we explicitly mention the fix which is just one line change - replace "Foo extends BaseXXXObserver" with "Foo implements XXXObserver" - it makes it very easy.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)