public class ZkConfigManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIGS_ZKNODE
ZkNode where named configs are stored
|
Constructor and Description |
---|
ZkConfigManager(SolrZkClient zkClient)
Creates a new ZkConfigManager
|
Modifier and Type | Method and Description |
---|---|
void |
downloadConfigDir(String configName,
Path dir)
Download a config from Zookeeper and write it to the filesystem
|
List<String> |
listConfigs() |
void |
uploadConfigDir(Path dir,
String configName)
Upload files from a given path to a config in Zookeeper
|
public static final String CONFIGS_ZKNODE
public ZkConfigManager(SolrZkClient zkClient)
zkClient
- the SolrZkClient
to usepublic void uploadConfigDir(Path dir, String configName) throws IOException
dir
- Path
to the filesconfigName
- the name to give the configIOException
- if an I/O error occurs or the path does not existpublic void downloadConfigDir(String configName, Path dir) throws IOException
configName
- the config to downloaddir
- the Path
to write files underIOException
- if an I/O error occurs or the config does not existpublic List<String> listConfigs() throws IOException
IOException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.