gpt4 book ai didi

com.dremio.service.coordinator.zk.ZKClusterCoordinator.start()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 06:22:31 25 4
gpt4 key购买 nike

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

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

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