本文整理了Java中org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver.<init>()
方法的一些代码示例,展示了ZKClusterCoordinatorDriver.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClusterCoordinatorDriver.<init>()
方法的具体详情如下:
包路径:org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver
类名称:ZKClusterCoordinatorDriver
方法名:<init>
暂无
代码示例来源:origin: apache/drill
int userPort = config.getInt(DrillOnYarnConfig.DRILLBIT_USER_PORT);
int bitPort = config.getInt(DrillOnYarnConfig.DRILLBIT_BIT_PORT);
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setConnect(zkConnect, zkRoot, clusterId)
.setFailureTimoutMs(failureTimeoutMs)
代码示例来源:origin: apache/drill
/**
* Validate that the key format used for endpoint is the same as that
* generated for hosts coming from YARN.
*/
@Test
public void testFormat() {
DrillbitEndpoint dbe = makeEndpoint(TEST_HOST);
assertEquals(makeKey(TEST_HOST), ZKClusterCoordinatorDriver.asString(dbe));
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setPorts(123, 456, 789);
assertEquals(makeKey(TEST_HOST), driver.toKey(TEST_HOST));
// Internal default ports (used mostly for testing.)
driver = new ZKClusterCoordinatorDriver();
assertEquals("fred:31010:31011:31012", driver.toKey(FRED_HOST));
}
代码示例来源:origin: apache/drill
/**
* Basic setup: start a ZK and verify that the initial endpoint list is empty.
* Also validates the basics of the test setup (mock server, etc.)
*
* @throws Exception
*/
@Test
public void testBasics() throws Exception {
try (TestingServer server = new TestingServer()) {
server.start();
String connStr = server.getConnectString();
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setConnect(connStr, "drill", "drillbits").build();
assertTrue(driver.getInitialEndpoints().isEmpty());
driver.close();
server.stop();
}
}
代码示例来源:origin: apache/drill
server.start();
String connStr = server.getConnectString();
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();
ZKClusterCoordinatorDriver driver2 = new ZKClusterCoordinatorDriver()
.setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();
ZKClusterCoordinatorDriver driver2 = new ZKClusterCoordinatorDriver()
.setConnect(connStr, TEST_ZK_ROOT, PROBE_CLUSTER_ID).build();
ZKClusterCoordinatorDriver driver2 = new ZKClusterCoordinatorDriver()
.setConnect(connStr, PROBE_ZK_ROOT, TEST_CLUSTER_ID).build();
ZKClusterCoordinatorDriver driver2 = new ZKClusterCoordinatorDriver()
.setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();
代码示例来源:origin: apache/drill
addDrillbit(probeZk, FRED_HOST);
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setConnect(connStr, ZK_ROOT, CLUSTER_ID).build();
List<DrillbitEndpoint> bits = driver.getInitialEndpoints();
代码示例来源:origin: apache/drill
addDrillbit(probeZk, FRED_HOST);
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
.setConnect(connStr, ZK_ROOT, CLUSTER_ID)
.setPorts(TEST_USER_PORT, TEST_CONTROL_PORT, TEST_DATA_PORT).build();
内容来源于网络,如有侵权,请联系作者删除!