Skip to content

Commit

Permalink
[zookeeper] bump zookeeper to version 3.5.6 (apache#5043)
Browse files Browse the repository at this point in the history
With zookeeper 3.5.5 now marked as stable and 3.5 being reccomend for
the production branch (see https://zookeeper.apache.org/releases.html),
this moves pulsar up to 3.5.6.

Pulsar previously had 3.5.x support but was downgraded due to concerns
of 3.5 still being a "beta", so this is a fairly simple change

Fixes apache#4448

As a follow on to this work, we should introduce new configuration options to support TLS connections to ZK, however, that is out of scope for this initial dependency bump.
  • Loading branch information
addisonj authored and sijie committed Nov 1, 2019
1 parent dd58baf commit 89a9aaa
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
*/
package org.apache.bookkeeper.test;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;

import java.io.FileWriter;
import java.io.IOException;
import java.net.ConnectException;
import java.net.Inet4Address;
Expand All @@ -37,8 +32,6 @@

import lombok.Cleanup;

import org.jboss.netty.util.internal.ByteBufferUtil;

/**
* Port manager allows a base port to be specified on the commandline. Tests will then use ports, counting up from this
* base port. This allows multiple instances of the bookkeeper tests to run at once.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ flexible messaging model and an intuitive client API.</description>
<commons-compress.version>1.19</commons-compress.version>

<bookkeeper.version>4.9.2</bookkeeper.version>
<zookeeper.version>3.4.13</zookeeper.version>
<zookeeper.version>3.5.6</zookeeper.version>
<netty.version>4.1.43.Final</netty.version>
<netty-tc-native.version>2.0.26.Final</netty-tc-native.version>
<storm.version>2.0.0</storm.version>
Expand Down
4 changes: 2 additions & 2 deletions pulsar-io/flume/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>2.6.0</version>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
Expand All @@ -113,4 +113,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.curator.test.InstanceSpec;
import org.apache.curator.test.TestingServer;
import org.apache.curator.utils.EnsurePath;
import org.apache.flume.conf.FlumeConfiguration;
Expand Down Expand Up @@ -53,7 +54,9 @@ public abstract class TestAbstractZooKeeperConfigurationProvider {

@Before
public void setUp() throws Exception {
zkServer = new TestingServer();
// start the instance without the admin server!
InstanceSpec serverSpec = new InstanceSpec(null, -1, -1, -1, true, -1, -1, -1, Collections.singletonMap("zookeeper.admin.enableServer", "false"));
zkServer = new TestingServer(serverSpec, true);
client = CuratorFrameworkFactory
.newClient("localhost:" + zkServer.getPort(),
new ExponentialBackoffRetry(1000, 3));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ public class TestZKServer implements AutoCloseable {
public TestZKServer() throws Exception {
this.zkDataDir = Files.newTemporaryFolder();
this.zkDataDir.deleteOnExit();
// Allow all commands on ZK control port
System.setProperty("zookeeper.4lw.commands.whitelist", "*");
// disable the admin server as to not have any port conflicts
System.setProperty("zookeeper.admin.enableServer", "false");
this.zks = new ZooKeeperServer(zkDataDir, zkDataDir, ZooKeeperServer.DEFAULT_TICK_TIME);
this.serverFactory = new NIOServerCnxnFactory();
this.serverFactory.configure(new InetSocketAddress(0), 1000);
this.serverFactory.startup(zks);
this.serverFactory.startup(zks, true);

log.info("Started test ZK server on port {}", getPort());

Expand Down
2 changes: 1 addition & 1 deletion pulsar-sql/presto-distribution/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ The Apache Software License, Version 2.0
- memory-0.8.3.jar
- sketches-core-0.8.3.jar
* Apache Zookeeper
- zookeeper-3.4.13.jar
- zookeeper-3.5.5.jar
* Apache Yetus Audience Annotations
- audience-annotations-0.5.0.jar
* Swagger
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions pulsar-zookeeper-utils/src/main/resources/META-INF/aop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
</weaver>

<aspects>
<aspect
name="org.apache.pulsar.zookeeper.SerializeUtilsAspect" />
<aspect name="org.apache.pulsar.broker.zookeeper.aspectj.ClientCnxnAspect" />
</aspects>
</aspectj>
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public void start() throws IOException {
try {
// Allow all commands on ZK control port
System.setProperty("zookeeper.4lw.commands.whitelist", "*");
// disable the admin server as to not have any port conflicts
System.setProperty("zookeeper.admin.enableServer", "false");
zks = new ZooKeeperServer(zkTmpDir, zkTmpDir, ZooKeeperServer.DEFAULT_TICK_TIME);
zks.setMaxSessionTimeout(20000);
serverFactory = new NIOServerCnxnFactory();
Expand Down

0 comments on commit 89a9aaa

Please sign in to comment.