You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by Tamas Penzes <ta...@cloudera.com.INVALID> on 2020/05/21 22:26:26 UTC

Building Curator 5.0 with ZooKeeper 3.5

Hi All,

After seeing Jordan's message to call people to test Curator I've tried to
build our whole stack together with Curator 5.0.0-snapshot (just to check
what fails).
As we use our own ZooKeeper version based on ZooKeeper 3.5.5 the given
ZooKeeper got replaced in Curator and the Curator build failed. I got the
following error during the build:

[INFO] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java:[21,28]
cannot find symbol
  symbol:   class AddWatchMode
  location: package org.apache.zookeeper

...


The root cause is that ZOOKEEPER-1416 is only present in ZooKeeper 3.6.0+.

Does Curator want to be compatible with ZooKeeper 3.5 only in runtime or we
should be able to build it against ZooKeeper 3.5.x versions too?

Is there any way to recognise which ZooKeeper version we use runtime (to
raise an exception) or any feature flag to block these features or users
have to limit their use of Curator features (based on which ZooKeeper they
use) based on the documentation?

Based on this updating Curator first and ZooKeeper afterwards won't work.
Does Curator 4.3.0 work with ZooKeeper 3.6.x?

Thanks, Tamaas

Re: Building Curator 5.0 with ZooKeeper 3.5

Posted by Tamas Penzes <ta...@cloudera.com.INVALID>.
Okay, so we will have to do the upgrade together.
That's very useful information.

Thanks, Tamaas

On Fri, May 22, 2020 at 1:10 AM Jordan Zimmerman <jo...@jordanzimmerman.com>
wrote:

> We're in a catch-22. Curator 4.3's source cannot build against ZK 3.6.0
> due to API changes. So, there's nothing we can do regarding that.
>
> -JZ
>
> > On May 21, 2020, at 5:26 PM, Tamas Penzes <ta...@cloudera.com.INVALID>
> wrote:
> >
> > Hi All,
> >
> > After seeing Jordan's message to call people to test Curator I've tried
> to
> > build our whole stack together with Curator 5.0.0-snapshot (just to check
> > what fails).
> > As we use our own ZooKeeper version based on ZooKeeper 3.5.5 the given
> > ZooKeeper got replaced in Curator and the Curator build failed. I got the
> > following error during the build:
> >
> > [INFO]
> /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
> > Recompile with -Xlint:deprecation for details.
> > [INFO] -------------------------------------------------------------
> > [ERROR] COMPILATION ERROR :
> > [INFO] -------------------------------------------------------------
> > [ERROR]
> /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java:[21,28]
> > cannot find symbol
> >  symbol:   class AddWatchMode
> >  location: package org.apache.zookeeper
> >
> > ...
> >
> >
> > The root cause is that ZOOKEEPER-1416 is only present in ZooKeeper
> 3.6.0+.
> >
> > Does Curator want to be compatible with ZooKeeper 3.5 only in runtime or
> we
> > should be able to build it against ZooKeeper 3.5.x versions too?
> >
> > Is there any way to recognise which ZooKeeper version we use runtime (to
> > raise an exception) or any feature flag to block these features or users
> > have to limit their use of Curator features (based on which ZooKeeper
> they
> > use) based on the documentation?
> >
> > Based on this updating Curator first and ZooKeeper afterwards won't work.
> > Does Curator 4.3.0 work with ZooKeeper 3.6.x?
> >
> > Thanks, Tamaas
>
>

-- 
*Tamás Pénzes* | Software Engineering Manager
e. tamaas@cloudera.com
cloudera.com <https://www.cloudera.com>
[image: Cloudera] <https://www.cloudera.com/>
[image: Cloudera on Twitter] <https://twitter.com/cloudera> [image:
Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera
on LinkedIn] <https://www.linkedin.com/company/cloudera>
<https://www.cloudera.com/>
------------------------------

Re: Building Curator 5.0 with ZooKeeper 3.5

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
We're in a catch-22. Curator 4.3's source cannot build against ZK 3.6.0 due to API changes. So, there's nothing we can do regarding that.

-JZ

> On May 21, 2020, at 5:26 PM, Tamas Penzes <ta...@cloudera.com.INVALID> wrote:
> 
> Hi All,
> 
> After seeing Jordan's message to call people to test Curator I've tried to
> build our whole stack together with Curator 5.0.0-snapshot (just to check
> what fails).
> As we use our own ZooKeeper version based on ZooKeeper 3.5.5 the given
> ZooKeeper got replaced in Curator and the Curator build failed. I got the
> following error during the build:
> 
> [INFO] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
> Recompile with -Xlint:deprecation for details.
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java:[21,28]
> cannot find symbol
>  symbol:   class AddWatchMode
>  location: package org.apache.zookeeper
> 
> ...
> 
> 
> The root cause is that ZOOKEEPER-1416 is only present in ZooKeeper 3.6.0+.
> 
> Does Curator want to be compatible with ZooKeeper 3.5 only in runtime or we
> should be able to build it against ZooKeeper 3.5.x versions too?
> 
> Is there any way to recognise which ZooKeeper version we use runtime (to
> raise an exception) or any feature flag to block these features or users
> have to limit their use of Curator features (based on which ZooKeeper they
> use) based on the documentation?
> 
> Based on this updating Curator first and ZooKeeper afterwards won't work.
> Does Curator 4.3.0 work with ZooKeeper 3.6.x?
> 
> Thanks, Tamaas


Re: Building Curator 5.0 with ZooKeeper 3.5

Posted by Tamas Penzes <ta...@cloudera.com.INVALID>.
We are building each component from source, Curator too.
If we cannot build it against ZK 3.5.x that has an effect on how we can
update ZooKeeper and Curator next time.

If Curator 4.3 works with ZK 3.6.x we can update in two steps (first
ZooKeeper for all, second Curator component-by-component).
If that doesn't work we will have to do the Curator and ZK update in one
step which needs a "bit more" coordination.

On Fri, May 22, 2020 at 12:34 AM Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> Having Curator's 5.0.0-SNAPSHOT in your build should not cause that error.
> Make sure you exclude ZooKeeper in Curator's dependency spec. i.e in Maven:
>
> <dependency>
>     <groupId>org.apache.curator</groupId>
>     <artifactId>curator-recipes</artifactId>
>     <version>5.0.0-SNAPSHOT</version>
>     <exclusions>
>         <exclusion>
>             <groupId>org.apache.zookeeper</groupId>
>             <artifactId>zookeeper</artifactId>
>         </exclusion>
>     </exclusions>
>     <scope>test</scope>
> </dependency>
> Or are you building Curator from source? Building from source won't work
> as we now build against ZooKeeper 3.6.0.
>
> -Jordan
>
> > On May 21, 2020, at 5:26 PM, Tamas Penzes <ta...@cloudera.com.INVALID>
> wrote:
> >
> > Hi All,
> >
> > After seeing Jordan's message to call people to test Curator I've tried
> to
> > build our whole stack together with Curator 5.0.0-snapshot (just to check
> > what fails).
> > As we use our own ZooKeeper version based on ZooKeeper 3.5.5 the given
> > ZooKeeper got replaced in Curator and the Curator build failed. I got the
> > following error during the build:
> >
> > [INFO]
> /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
> > Recompile with -Xlint:deprecation for details.
> > [INFO] -------------------------------------------------------------
> > [ERROR] COMPILATION ERROR :
> > [INFO] -------------------------------------------------------------
> > [ERROR]
> /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java:[21,28]
> > cannot find symbol
> >  symbol:   class AddWatchMode
> >  location: package org.apache.zookeeper
> >
> > ...
> >
> >
> > The root cause is that ZOOKEEPER-1416 is only present in ZooKeeper
> 3.6.0+.
> >
> > Does Curator want to be compatible with ZooKeeper 3.5 only in runtime or
> we
> > should be able to build it against ZooKeeper 3.5.x versions too?
> >
> > Is there any way to recognise which ZooKeeper version we use runtime (to
> > raise an exception) or any feature flag to block these features or users
> > have to limit their use of Curator features (based on which ZooKeeper
> they
> > use) based on the documentation?
> >
> > Based on this updating Curator first and ZooKeeper afterwards won't work.
> > Does Curator 4.3.0 work with ZooKeeper 3.6.x?
> >
> > Thanks, Tamaas

Re: Building Curator 5.0 with ZooKeeper 3.5

Posted by Jordan Zimmerman <jo...@jordanzimmerman.com>.
Having Curator's 5.0.0-SNAPSHOT in your build should not cause that error. Make sure you exclude ZooKeeper in Curator's dependency spec. i.e in Maven:

<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-recipes</artifactId>
    <version>5.0.0-SNAPSHOT</version>
    <exclusions>
        <exclusion>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
        </exclusion>
    </exclusions>
    <scope>test</scope>
</dependency>
Or are you building Curator from source? Building from source won't work as we now build against ZooKeeper 3.6.0.

-Jordan

> On May 21, 2020, at 5:26 PM, Tamas Penzes <ta...@cloudera.com.INVALID> wrote:
> 
> Hi All,
> 
> After seeing Jordan's message to call people to test Curator I've tried to
> build our whole stack together with Curator 5.0.0-snapshot (just to check
> what fails).
> As we use our own ZooKeeper version based on ZooKeeper 3.5.5 the given
> ZooKeeper got replaced in Curator and the Curator build failed. I got the
> following error during the build:
> 
> [INFO] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
> Recompile with -Xlint:deprecation for details.
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] /Users/tamaas/projects/curator/curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java:[21,28]
> cannot find symbol
>  symbol:   class AddWatchMode
>  location: package org.apache.zookeeper
> 
> ...
> 
> 
> The root cause is that ZOOKEEPER-1416 is only present in ZooKeeper 3.6.0+.
> 
> Does Curator want to be compatible with ZooKeeper 3.5 only in runtime or we
> should be able to build it against ZooKeeper 3.5.x versions too?
> 
> Is there any way to recognise which ZooKeeper version we use runtime (to
> raise an exception) or any feature flag to block these features or users
> have to limit their use of Curator features (based on which ZooKeeper they
> use) based on the documentation?
> 
> Based on this updating Curator first and ZooKeeper afterwards won't work.
> Does Curator 4.3.0 work with ZooKeeper 3.6.x?
> 
> Thanks, Tamaas