gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 09:52:21 26 4
gpt4 key购买 nike

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

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();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com