|
@@ -48,6 +48,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
ClientBaseWithFixes {
|
|
ClientBaseWithFixes {
|
|
|
|
|
|
private static final int ZK_OP_WAIT_TIME = 3000;
|
|
private static final int ZK_OP_WAIT_TIME = 3000;
|
|
|
|
+ private static final int ZK_TIMEOUT_MS = 1000;
|
|
private Log LOG =
|
|
private Log LOG =
|
|
LogFactory.getLog(TestZKRMStateStoreZKClientConnections.class);
|
|
LogFactory.getLog(TestZKRMStateStoreZKClientConnections.class);
|
|
|
|
|
|
@@ -84,7 +85,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
@Override
|
|
@Override
|
|
public ZooKeeper getNewZooKeeper()
|
|
public ZooKeeper getNewZooKeeper()
|
|
throws IOException, InterruptedException {
|
|
throws IOException, InterruptedException {
|
|
- return createClient(watcher, hostPort, 100);
|
|
|
|
|
|
+ return createClient(watcher, hostPort, ZK_TIMEOUT_MS);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -136,7 +137,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
final String path = "/test";
|
|
final String path = "/test";
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
- conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, 1000);
|
|
|
|
|
|
+ conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
|
|
conf.setLong(YarnConfiguration.RM_ZK_RETRY_INTERVAL_MS, 100);
|
|
conf.setLong(YarnConfiguration.RM_ZK_RETRY_INTERVAL_MS, 100);
|
|
final ZKRMStateStore store =
|
|
final ZKRMStateStore store =
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
@@ -169,7 +170,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
String path = "/test";
|
|
String path = "/test";
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
- conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, 100);
|
|
|
|
|
|
+ conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
|
|
ZKRMStateStore store =
|
|
ZKRMStateStore store =
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
TestDispatcher dispatcher = new TestDispatcher();
|
|
TestDispatcher dispatcher = new TestDispatcher();
|
|
@@ -211,7 +212,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
String path = "/test";
|
|
String path = "/test";
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
- conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, 100);
|
|
|
|
|
|
+ conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
|
|
ZKRMStateStore store =
|
|
ZKRMStateStore store =
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
(ZKRMStateStore) zkClientTester.getRMStateStore(conf);
|
|
TestDispatcher dispatcher = new TestDispatcher();
|
|
TestDispatcher dispatcher = new TestDispatcher();
|
|
@@ -274,7 +275,7 @@ public class TestZKRMStateStoreZKClientConnections extends
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
TestZKClient zkClientTester = new TestZKClient();
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
YarnConfiguration conf = new YarnConfiguration();
|
|
conf.setInt(YarnConfiguration.RM_ZK_NUM_RETRIES, 1);
|
|
conf.setInt(YarnConfiguration.RM_ZK_NUM_RETRIES, 1);
|
|
- conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, 100);
|
|
|
|
|
|
+ conf.setInt(YarnConfiguration.RM_ZK_TIMEOUT_MS, ZK_TIMEOUT_MS);
|
|
conf.set(YarnConfiguration.RM_ZK_ACL, TEST_ACL);
|
|
conf.set(YarnConfiguration.RM_ZK_ACL, TEST_ACL);
|
|
conf.set(YarnConfiguration.RM_ZK_AUTH, TEST_AUTH_GOOD);
|
|
conf.set(YarnConfiguration.RM_ZK_AUTH, TEST_AUTH_GOOD);
|
|
|
|
|