HBASE-3861 MiniZooKeeperCluster.startup() should refer to hbase.zookeeper.property.maxClientCnxns; backing it out till figure the TestHCM OOME issue
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1100390 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7bc1722112
commit
40cb8dffc2
|
@ -100,8 +100,6 @@ Release 0.91.0 - Unreleased
|
||||||
HBASE-3849 Fix master ui; hbase-1502 broke requests/second
|
HBASE-3849 Fix master ui; hbase-1502 broke requests/second
|
||||||
HBASE-3853 Fix TestInfoServers to pass after HBASE-3835 (todd)
|
HBASE-3853 Fix TestInfoServers to pass after HBASE-3835 (todd)
|
||||||
HBASE-3862 Race conditions in aggregate calculation (John Heitmann)
|
HBASE-3862 Race conditions in aggregate calculation (John Heitmann)
|
||||||
HBASE-3861 MiniZooKeeperCluster should refer to maxClientCnxns (Eugene
|
|
||||||
Koontz via Andrew Purtell)
|
|
||||||
HBASE-3865 Failing TestWALReplay
|
HBASE-3865 Failing TestWALReplay
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -33,9 +33,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
|
||||||
import org.apache.hadoop.fs.FileUtil;
|
import org.apache.hadoop.fs.FileUtil;
|
||||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
|
||||||
import org.apache.zookeeper.server.NIOServerCnxn;
|
import org.apache.zookeeper.server.NIOServerCnxn;
|
||||||
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;
|
||||||
|
@ -63,17 +61,9 @@ public class MiniZooKeeperCluster {
|
||||||
private int activeZKServerIndex;
|
private int activeZKServerIndex;
|
||||||
private int tickTime = 0;
|
private int tickTime = 0;
|
||||||
|
|
||||||
private Configuration configuration;
|
|
||||||
|
|
||||||
/** Create mini ZooKeeper cluster. */
|
/** Create mini ZooKeeper cluster. */
|
||||||
public MiniZooKeeperCluster() {
|
public MiniZooKeeperCluster() {
|
||||||
this(HBaseConfiguration.create());
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create mini ZooKeeper cluster. */
|
|
||||||
public MiniZooKeeperCluster(Configuration configuration) {
|
|
||||||
this.started = false;
|
this.started = false;
|
||||||
this.configuration = configuration;
|
|
||||||
activeZKServerIndex = -1;
|
activeZKServerIndex = -1;
|
||||||
zooKeeperServers = new ArrayList<ZooKeeperServer>();
|
zooKeeperServers = new ArrayList<ZooKeeperServer>();
|
||||||
clientPortList = new ArrayList<Integer>();
|
clientPortList = new ArrayList<Integer>();
|
||||||
|
@ -141,13 +131,12 @@ public class MiniZooKeeperCluster {
|
||||||
} else {
|
} else {
|
||||||
tickTimeToUse = TICK_TIME;
|
tickTimeToUse = TICK_TIME;
|
||||||
}
|
}
|
||||||
int numberOfConnections = this.configuration.getInt("hbase.zookeeper.property.maxClientCnxns",5000);
|
|
||||||
ZooKeeperServer server = new ZooKeeperServer(dir, dir, tickTimeToUse);
|
ZooKeeperServer server = new ZooKeeperServer(dir, dir, tickTimeToUse);
|
||||||
NIOServerCnxn.Factory standaloneServerFactory;
|
NIOServerCnxn.Factory standaloneServerFactory;
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
standaloneServerFactory =
|
standaloneServerFactory =
|
||||||
new NIOServerCnxn.Factory(new InetSocketAddress(clientPort), numberOfConnections);
|
new NIOServerCnxn.Factory(new InetSocketAddress(clientPort));
|
||||||
} catch (BindException e) {
|
} catch (BindException e) {
|
||||||
LOG.info("Failed binding ZK Server to client port: " + clientPort);
|
LOG.info("Failed binding ZK Server to client port: " + clientPort);
|
||||||
//this port is already in use. try to use another
|
//this port is already in use. try to use another
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class HBaseTestingUtility {
|
||||||
if (this.zkCluster != null) {
|
if (this.zkCluster != null) {
|
||||||
throw new IOException("Cluster already running at " + dir);
|
throw new IOException("Cluster already running at " + dir);
|
||||||
}
|
}
|
||||||
this.zkCluster = new MiniZooKeeperCluster(this.getConfiguration());
|
this.zkCluster = new MiniZooKeeperCluster();
|
||||||
int clientPort = this.zkCluster.startup(dir,zooKeeperServerNum);
|
int clientPort = this.zkCluster.startup(dir,zooKeeperServerNum);
|
||||||
this.conf.set("hbase.zookeeper.property.clientPort",
|
this.conf.set("hbase.zookeeper.property.clientPort",
|
||||||
Integer.toString(clientPort));
|
Integer.toString(clientPort));
|
||||||
|
|
|
@ -146,14 +146,4 @@
|
||||||
version is X.X.X-SNAPSHOT"
|
version is X.X.X-SNAPSHOT"
|
||||||
</description>
|
</description>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
|
||||||
<name>hbase.zookeeper.property.maxClientCnxns</name>
|
|
||||||
<value>5000</value>
|
|
||||||
<description>Property from ZooKeeper's config zoo.cfg.
|
|
||||||
Limit on number of concurrent connections (at the socket level) that a
|
|
||||||
single client, identified by IP address, may make to a single member of
|
|
||||||
the ZooKeeper ensemble. Set high to avoid zk connection issues running
|
|
||||||
standalone and pseudo-distributed.
|
|
||||||
</description>
|
|
||||||
</property>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Loading…
Reference in New Issue