gpt4 book ai didi

org.apache.solr.cloud.ZkController.downloadConfigDir()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 19:20:49 26 4
gpt4 key购买 nike

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

ZkController.downloadConfigDir介绍

暂无

代码示例

代码示例来源:origin: com.cloudera.cdk/cdk-morphlines-solr-core

/**
 * Download and return the config directory from ZK
 */
public File downloadConfigDir(SolrZkClient zkClient, String configName, File dir)
throws IOException, InterruptedException, KeeperException {
 Preconditions.checkArgument(dir.exists());
 Preconditions.checkArgument(dir.isDirectory());
 ZkController.downloadConfigDir(zkClient, configName, dir);
 File confDir = new File(dir, "conf");
 if (!confDir.isDirectory()) {
  // create a temporary directory with "conf" subdir and mv the config in there.  This is
  // necessary because of CDH-11188; solrctl does not generate nor accept directories with e.g.
  // conf/solrconfig.xml which is necessary for proper solr operation.  This should work
  // even if solrctl changes.
  confDir = new File(Files.createTempDir().getAbsolutePath(), "conf");
  confDir.getParentFile().deleteOnExit();
  Files.move(dir, confDir);
  dir = confDir.getParentFile();
 }
 verifyConfigDir(confDir);
 return dir;
}

代码示例来源:origin: cloudera/search

/**
 * Download and return the config directory from ZK
 */
public File downloadConfigDir(SolrZkClient zkClient, String configName)
throws IOException, InterruptedException, KeeperException {
 File dir = Files.createTempDir();
 dir.deleteOnExit();
 ZkController.downloadConfigDir(zkClient, configName, dir);
 File confDir = new File(dir, "conf");
 if (!confDir.isDirectory()) {
  // create a temporary directory with "conf" subdir and mv the config in there.  This is
  // necessary because of CDH-11188; solrctl does not generate nor accept directories with e.g.
  // conf/solrconfig.xml which is necessary for proper solr operation.  This should work
  // even if solrctl changes.
  confDir = new File(Files.createTempDir().getAbsolutePath(), "conf");
  confDir.getParentFile().deleteOnExit();
  Files.move(dir, confDir);
  dir = confDir.getParentFile();
 }
 verifyConfigDir(confDir);
 return dir;
}

代码示例来源:origin: org.kitesdk/kite-morphlines-solr-core

/**
 * Download and return the config directory from ZK
 */
public File downloadConfigDir(SolrZkClient zkClient, String configName, File dir)
throws IOException, InterruptedException, KeeperException {
 Preconditions.checkArgument(dir.exists());
 Preconditions.checkArgument(dir.isDirectory());
 ZkController.downloadConfigDir(zkClient, configName, dir);
 File confDir = new File(dir, "conf");
 if (!confDir.isDirectory()) {
  // create a temporary directory with "conf" subdir and mv the config in there.  This is
  // necessary because of CDH-11188; solrctl does not generate nor accept directories with e.g.
  // conf/solrconfig.xml which is necessary for proper solr operation.  This should work
  // even if solrctl changes.
  confDir = new File(Files.createTempDir().getAbsolutePath(), "conf");
  confDir.getParentFile().deleteOnExit();
  Files.move(dir, confDir);
  dir = confDir.getParentFile();
 }
 verifyConfigDir(confDir);
 return dir;
}

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