List of usage examples for org.apache.solr.common.cloud SolrZkClient create
public String create(final String path, final byte[] data, final CreateMode createMode, boolean retryOnConnLoss) throws KeeperException, InterruptedException
From source file:com.doculibre.constellio.services.SolrServicesImpl.java
License:Open Source License
public static void writePlainConfigInCloud(String fileName, byte[] ouput) { try {//from w w w. ja va 2 s . c o m SolrZkClient zkClient = SolrCoreContext.getSolrZkClient(); if (!zkClient.exists(ZkController.CONFIGS_ZKNODE + "/" + fileName, true)) { zkClient.create(ZkController.CONFIGS_ZKNODE + "/" + fileName, ouput, CreateMode.PERSISTENT, true); } else { zkClient.setData(ZkController.CONFIGS_ZKNODE + "/" + fileName, ouput, true); } } catch (Exception e) { e.printStackTrace(); } }