org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver.setConnect()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver.setConnect()方法的一些代码示例,展示了ZKClusterCoordinatorDriver.setConnect()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClusterCoordinatorDriver.setConnect()方法的具体详情如下:
包路径:org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver
类名称:ZKClusterCoordinatorDriver
方法名:setConnect

ZKClusterCoordinatorDriver.setConnect介绍

[英]Specify connect string in the form: host:/zkRoot/clusterId
[中]以如下形式指定连接字符串:host:/zkRoot/clusterId

代码示例

代码示例来源:origin: apache/drill

int bitPort = config.getInt(DrillOnYarnConfig.DRILLBIT_BIT_PORT);
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
  .setConnect(zkConnect, zkRoot, clusterId)
  .setFailureTimoutMs(failureTimeoutMs)
  .setRetryCount(retryCount)

代码示例来源: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

String connStr = server.getConnectString();
ZKClusterCoordinatorDriver driver = new ZKClusterCoordinatorDriver()
  .setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();
   .setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();
   .setConnect(connStr, TEST_ZK_ROOT, PROBE_CLUSTER_ID).build();
   .setConnect(connStr, PROBE_ZK_ROOT, TEST_CLUSTER_ID).build();
   .setConnect(connStr, TEST_ZK_ROOT, TEST_CLUSTER_ID).build();

代码示例来源:origin: apache/drill

.setConnect(connStr, ZK_ROOT, CLUSTER_ID).build();
List<DrillbitEndpoint> bits = driver.getInitialEndpoints();
assertEquals(1, bits.size());

代码示例来源:origin: apache/drill

.setConnect(connStr, ZK_ROOT, CLUSTER_ID)
  .setPorts(TEST_USER_PORT, TEST_CONTROL_PORT, TEST_DATA_PORT).build();
ZKRegistry registry = new ZKRegistry(driver);

相关文章