HBASE-24132 Upgrade to Apache ZooKeeper 3.5.7 (#1453)
* HBASE-24132 Upgrade to Apache ZooKeeper 3.5.7 * HBASE-24132 Upgrade to Apache ZooKeeper 3.5.7 Co-authored-by: 姜建飞 10222269 <jiang.jianfei@zte.com.cn> Signed-off-by: Mate Szalay-Beko <szalay.beko.mate@gmail.com> Signed-off-by: Norbert Kalmar <nkalmar@cloudera.com> Signed-off-by: stack <stack@apache.org> Signed-off-by: Duo Zhang <zhangdo@apache.org>
This commit is contained in:
parent
91361ca999
commit
2f4ae522c3
|
@ -3196,4 +3196,19 @@ Copyright (c) 2007-2017 The JRuby project
|
||||||
</licenses>
|
</licenses>
|
||||||
</project>
|
</project>
|
||||||
</supplement>
|
</supplement>
|
||||||
|
<supplement>
|
||||||
|
<project>
|
||||||
|
<groupId>jline</groupId>
|
||||||
|
<artifactId>jline</artifactId>
|
||||||
|
<name>JLine</name>
|
||||||
|
<version>2.11</version>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>BSD License</name>
|
||||||
|
<url>http://www.opensource.org/licenses/bsd-license.php</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
</project>
|
||||||
|
</supplement>
|
||||||
</supplementalDataModels>
|
</supplementalDataModels>
|
||||||
|
|
|
@ -328,8 +328,8 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ZooKeeper Client Version</td>
|
<td>ZooKeeper Client Version</td>
|
||||||
<td><% org.apache.zookeeper.Version.getVersion() %>, revision=<% org.apache.zookeeper.Version.getRevision() %></td>
|
<td><% org.apache.zookeeper.Version.getVersion() %>, revision=<% org.apache.zookeeper.Version.getRevisionHash() %></td>
|
||||||
<td>ZooKeeper client version and revision</td>
|
<td>ZooKeeper client version and revision hash</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ZooKeeper Client Compiled</td>
|
<td>ZooKeeper Client Compiled</td>
|
||||||
|
|
|
@ -197,8 +197,8 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ZooKeeper Client Version</td>
|
<td>ZooKeeper Client Version</td>
|
||||||
<td><% org.apache.zookeeper.Version.getVersion() %>, revision=<% org.apache.zookeeper.Version.getRevision() %></td>
|
<td><% org.apache.zookeeper.Version.getVersion() %>, revision=<% org.apache.zookeeper.Version.getRevisionHash() %></td>
|
||||||
<td>ZooKeeper client version and revision</td>
|
<td>ZooKeeper client version and revision hash</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ZooKeeper Client Compiled</td>
|
<td>ZooKeeper Client Compiled</td>
|
||||||
|
|
|
@ -112,6 +112,9 @@ public class TestRegionMoveAndAbandon {
|
||||||
cluster.killRegionServer(rs2.getServerName());
|
cluster.killRegionServer(rs2.getServerName());
|
||||||
UTIL.waitFor(30_000, () -> rs2.isStopped() && !rs2.isAlive());
|
UTIL.waitFor(30_000, () -> rs2.isStopped() && !rs2.isAlive());
|
||||||
UTIL.waitFor(30_000, () -> rs1.isStopped() && !rs1.isAlive());
|
UTIL.waitFor(30_000, () -> rs1.isStopped() && !rs1.isAlive());
|
||||||
|
// make sure none of regionserver threads is alive.
|
||||||
|
UTIL.waitFor(30_000, () ->
|
||||||
|
UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().isEmpty());
|
||||||
// Start up everything again
|
// Start up everything again
|
||||||
LOG.info("Starting cluster");
|
LOG.info("Starting cluster");
|
||||||
UTIL.getMiniHBaseCluster().startMaster();
|
UTIL.getMiniHBaseCluster().startMaster();
|
||||||
|
|
|
@ -23,7 +23,6 @@ import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.UnknownHostException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
|
@ -42,6 +41,7 @@ import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.apache.yetus.audience.InterfaceStability;
|
import org.apache.yetus.audience.InterfaceStability;
|
||||||
import org.apache.zookeeper.server.ServerConfig;
|
import org.apache.zookeeper.server.ServerConfig;
|
||||||
import org.apache.zookeeper.server.ZooKeeperServerMain;
|
import org.apache.zookeeper.server.ZooKeeperServerMain;
|
||||||
|
import org.apache.zookeeper.server.admin.AdminServer;
|
||||||
import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
|
import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
|
||||||
import org.apache.zookeeper.server.quorum.QuorumPeerMain;
|
import org.apache.zookeeper.server.quorum.QuorumPeerMain;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public final class HQuorumPeer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void runZKServer(QuorumPeerConfig zkConfig)
|
private static void runZKServer(QuorumPeerConfig zkConfig)
|
||||||
throws UnknownHostException, IOException {
|
throws IOException, AdminServer.AdminServerException {
|
||||||
if (zkConfig.isDistributed()) {
|
if (zkConfig.isDistributed()) {
|
||||||
QuorumPeerMain qp = new QuorumPeerMain();
|
QuorumPeerMain qp = new QuorumPeerMain();
|
||||||
qp.runFromConfig(zkConfig);
|
qp.runFromConfig(zkConfig);
|
||||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.HConstants;
|
||||||
import org.apache.hadoop.hbase.net.Address;
|
import org.apache.hadoop.hbase.net.Address;
|
||||||
import org.apache.hadoop.hbase.util.Threads;
|
import org.apache.hadoop.hbase.util.Threads;
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
|
import org.apache.zookeeper.common.X509Exception;
|
||||||
import org.apache.zookeeper.server.NIOServerCnxnFactory;
|
import org.apache.zookeeper.server.NIOServerCnxnFactory;
|
||||||
import org.apache.zookeeper.server.ZooKeeperServer;
|
import org.apache.zookeeper.server.ZooKeeperServer;
|
||||||
import org.apache.zookeeper.server.persistence.FileTxnLog;
|
import org.apache.zookeeper.server.persistence.FileTxnLog;
|
||||||
|
@ -419,8 +420,8 @@ public class MiniZooKeeperCluster {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
send4LetterWord(HOST, port, "stat", (int)timeout);
|
send4LetterWord(HOST, port, "stat", false, (int)timeout);
|
||||||
} catch (IOException e) {
|
} catch (IOException | X509Exception.SSLContextException e) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,7 +443,7 @@ public class MiniZooKeeperCluster {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
String result = send4LetterWord(HOST, port, "stat", (int)timeout);
|
String result = send4LetterWord(HOST, port, "stat", false, (int)timeout);
|
||||||
if (result.startsWith("Zookeeper version:") && !result.contains("READ-ONLY")) {
|
if (result.startsWith("Zookeeper version:") && !result.contains("READ-ONLY")) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -451,7 +452,7 @@ public class MiniZooKeeperCluster {
|
||||||
} catch (ConnectException e) {
|
} catch (ConnectException e) {
|
||||||
// ignore as this is expected, do not log stacktrace
|
// ignore as this is expected, do not log stacktrace
|
||||||
LOG.info("{}:{} not up: {}", HOST, port, e.toString());
|
LOG.info("{}:{} not up: {}", HOST, port, e.toString());
|
||||||
} catch (IOException e) {
|
} catch (IOException | X509Exception.SSLContextException e) {
|
||||||
// ignore as this is expected
|
// ignore as this is expected
|
||||||
LOG.info("{}:{} not up", HOST, port, e);
|
LOG.info("{}:{} not up", HOST, port, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||||
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.apache.zookeeper.KeeperException;
|
|
||||||
import org.apache.zookeeper.ZooKeeperMain;
|
import org.apache.zookeeper.ZooKeeperMain;
|
||||||
|
import org.apache.zookeeper.cli.CliException;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,11 +57,11 @@ public class ZKMainServer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the command-line args passed. Calls System.exit when done.
|
* Run the command-line args passed. Calls System.exit when done.
|
||||||
* @throws KeeperException if an unexpected ZooKeeper exception happens
|
|
||||||
* @throws IOException in case of a network failure
|
* @throws IOException in case of a network failure
|
||||||
* @throws InterruptedException if the ZooKeeper client closes
|
* @throws InterruptedException if the ZooKeeper client closes
|
||||||
|
* @throws CliException if the ZooKeeper exception happens in cli command
|
||||||
*/
|
*/
|
||||||
void runCmdLine() throws KeeperException, IOException, InterruptedException {
|
void runCmdLine() throws IOException, InterruptedException, CliException {
|
||||||
processCmd(this.cl);
|
processCmd(this.cl);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -560,6 +560,10 @@ public class ZKWatcher implements Watcher, Abortable, Closeable {
|
||||||
LOG.debug(prefix("Received Disconnected from ZooKeeper, ignoring"));
|
LOG.debug(prefix("Received Disconnected from ZooKeeper, ignoring"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Closed:
|
||||||
|
LOG.debug(prefix("ZooKeeper client closed, ignoring"));
|
||||||
|
break;
|
||||||
|
|
||||||
case Expired:
|
case Expired:
|
||||||
String msg = prefix(this.identifier + " received expired from " +
|
String msg = prefix(this.identifier + " received expired from " +
|
||||||
"ZooKeeper, aborting");
|
"ZooKeeper, aborting");
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -1351,9 +1351,8 @@
|
||||||
<protobuf.plugin.version>0.6.1</protobuf.plugin.version>
|
<protobuf.plugin.version>0.6.1</protobuf.plugin.version>
|
||||||
<thrift.path>thrift</thrift.path>
|
<thrift.path>thrift</thrift.path>
|
||||||
<thrift.version>0.12.0</thrift.version>
|
<thrift.version>0.12.0</thrift.version>
|
||||||
<zookeeper.version>3.4.14</zookeeper.version>
|
<zookeeper.version>3.5.7</zookeeper.version>
|
||||||
<!-- What ZooKeeper 3.4.x depends on and nothing more -->
|
<jline.version>2.11</jline.version>
|
||||||
<jline.version>0.9.94</jline.version>
|
|
||||||
<slf4j.version>1.7.30</slf4j.version>
|
<slf4j.version>1.7.30</slf4j.version>
|
||||||
<clover.version>4.0.3</clover.version>
|
<clover.version>4.0.3</clover.version>
|
||||||
<jamon-runtime.version>2.4.1</jamon-runtime.version>
|
<jamon-runtime.version>2.4.1</jamon-runtime.version>
|
||||||
|
|
Loading…
Reference in New Issue