本文整理了Java中com.dremio.service.coordinator.zk.ZKClusterCoordinator.start()
方法的一些代码示例,展示了ZKClusterCoordinator.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKClusterCoordinator.start()
方法的具体详情如下:
包路径:com.dremio.service.coordinator.zk.ZKClusterCoordinator
类名称:ZKClusterCoordinator
方法名:start
暂无
代码示例来源:origin: dremio/dremio-oss
public int submitQuery(String planLocation, String queryString, String type, String zkQuorum, boolean local, int bits, String format, int width) throws Exception {
SabotConfig config = SabotConfig.create();
Preconditions.checkArgument(!local, "Can only run remote.");
DremioClient client = null;
Preconditions.checkArgument(!(planLocation == null && queryString == null), "Must provide either query file or query string");
Preconditions.checkArgument(!(planLocation != null && queryString != null), "Must provide either query file or query string, not both");
try {
ZKClusterCoordinator clusterCoordinator = new ZKClusterCoordinator(config, zkQuorum);
clusterCoordinator.start();
client = new DremioClient(config, clusterCoordinator);
client.connect();
String plan;
if (queryString == null) {
plan = Charsets.UTF_8.decode(ByteBuffer.wrap(Files.readAllBytes(Paths.get(planLocation)))).toString();
} else {
plan = queryString;
}
return submitQuery(client, plan, type, format, width);
} catch(Throwable th) {
System.err.println("Query Failed due to : " + th.getMessage());
return -1;
} finally {
if (client != null) {
client.close();
}
}
}
代码示例来源:origin: dremio/dremio-oss
String.format("%s/dremio/test/test-cluster-id", zooKeeperServer.getConnectString()))
) {
coordinator.start();
代码示例来源:origin: dremio/dremio-oss
String.format("%s/dremio/test/test-cluster-id", zooKeeperServer.getConnectString()))
) {
coordinator.start();
内容来源于网络,如有侵权,请联系作者删除!