本文整理了Java中org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver.asString()
方法的一些代码示例,展示了ZKClusterCoordinatorDriver.asString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClusterCoordinatorDriver.asString()
方法的具体详情如下:
包路径:org.apache.drill.yarn.zk.ZKClusterCoordinatorDriver
类名称:ZKClusterCoordinatorDriver
方法名:asString
[英]Convenience method to convert a Drillbit to a string. Note that ZK does not advertise the HTTP port, so it does not appear in the generated string.
[中]将钻头转换成钻柱的简便方法。请注意,ZK不会公布HTTP端口,因此它不会出现在生成的字符串中。
代码示例来源:origin: apache/drill
/**
* Convert a Drillbit endpoint to a string key used in the (zk-->task) map.
* Note that the string format here must match the one used in
* {@link #toKey(Task)} to map a task to string key.
*
* @param dbe
* the Drillbit endpoint from ZK
* @return a string key for this object
*/
private String toKey(DrillbitEndpoint dbe) {
return ZKClusterCoordinatorDriver.asString(dbe);
}
代码示例来源:origin: apache/drill
bitObj.put("trackingState", task.trackingState);
bitObj.put("endpoint",
ZKClusterCoordinatorDriver.asString(task.endpoint));
bitObj.put("link", task.getLink());
bitObj.put("startTime", task.getStartTime());
代码示例来源:origin: apache/drill
assertEquals(1, bits.size());
assertEquals(makeKey(FRED_HOST),
ZKClusterCoordinatorDriver.asString(bits.get(0)));
for (DrillbitEndpoint dbe : listener.added) {
assertEquals(makeKey(WILMA_HOST),
ZKClusterCoordinatorDriver.asString(dbe));
for (DrillbitEndpoint dbe : listener.removed) {
assertEquals(makeKey(FRED_HOST),
ZKClusterCoordinatorDriver.asString(dbe));
代码示例来源: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
assertNull(fredsTracker.task);
assertEquals(fredsKey,
ZKClusterCoordinatorDriver.asString(fredsTracker.endpoint));
内容来源于网络,如有侵权,请联系作者删除!