Yeah, for coprocessors, what Andrew said. You have to make minor changes. >From your repo, I was able to build:
HW10676:hbase-deps-test$ ./build.sh :compileJava Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase/1.1.0/hbase-1.1.0.pom Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-server/1.1.0/hbase-server-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-common/1.1.0/hbase-common-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-common/1.1.0/hbase-common-1.1.0-tests.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-protocol/1.1.0/hbase-protocol-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-procedure/1.1.0/hbase-procedure-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-client/1.1.0/hbase-client-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-prefix-tree/1.1.0/hbase-prefix-tree-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-hadoop-compat/1.1.0/hbase-hadoop-compat-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-hadoop2-compat/1.1.0/hbase-hadoop2-compat-1.1.0.jar Download https://repository.apache.org/content/repositories/orgapachehbase-1078/org/apache/hbase/hbase-annotations/1.1.0/hbase-annotations-1.1.0.jar :processResources UP-TO-DATE :classes :jar :assemble :compileTestJava UP-TO-DATE :processTestResources UP-TO-DATE :testClasses UP-TO-DATE :test UP-TO-DATE :check UP-TO-DATE :build BUILD SUCCESSFUL Total time: 1 mins 8.182 secs Also you should not need to pass -Dcompat.module=hbase-hadoop2-compat. Enis On Wed, May 13, 2015 at 3:21 PM, Andrew Purtell <[email protected]> wrote: > > So, it looks like RegionCoprocessorEnvironment.getRegion() has been > removed? > > No, the signature has changed, basically s/HRegion/Region/. HRegion is an > internal, low level implementation type. Has always been. We have replaced > it with Region, an interface that contains a subset of HRegion we feel we > can support for coprocessor source and binary compatibility longer term. > This work was done on HBASE-12972 if you're curious to know more about it. > > > I guess I deploy a new coproc that uses whatever the new method is, and > then in my client, detect at runtime which HBase version I'm talking to and > use that to determine which coprocessor to hit? > > Coprocessors are server side extensions. These API changes will require you > to modify the code you plan to deploy on the server. I don't think any > client side changes are needed. Unless your coprocessor implements an > Endpoint and _you_ are changing your RPC message formats, a 1.0.x client > shouldn't care whether it is talking to a 1.0.x server or a 1.1.x server, > running your coprocessor or not. > > > > On Wed, May 13, 2015 at 3:00 PM, James Estes <[email protected]> > wrote: > > > I saw the vote thread for RC2, so tried to build my project against it. > > > > My build fails when I depend on 1.1.0. I created a bare bones project > > to show the issue I'm running into: > > https://github.com/housejester/hbase-deps-test > > > > To be clear, it works in 1.0.0 (and I did add the repository). > > > > Further, we have a coprocessor and when I stand up a 1.1.0 HBase and > > call my endpoint, I get: > > > > ! Caused by: java.lang.NoSuchMethodError: > > > > > org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/HRegion; > > > > The same coprocessor works under 1.0.0. > > > > So, it looks like RegionCoprocessorEnvironment.getRegion() has been > > removed? > > > > The Audience annotation is: > > @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) > > @InterfaceStability.Evolving > > > > Since it is Evolving it is allowed to change in a breaking way. I'm > > trying to think about how I migrate. I guess I deploy a new coproc > > that uses whatever the new method is, and then in my client, detect at > > runtime which HBase version I'm talking to and use that to determine > > which coprocessor to hit? > > > > Thanks, > > James > > > > > > -- > Best regards, > > - Andy > > Problems worthy of attack prove their worth by hitting back. - Piet Hein > (via Tom White) >
