SolrClient.ZK module¶
Solr ZK api interface.
-
class
SolrClient.
ZK
(solr, log)¶ -
check_zk
()¶ Will attempt to telnet to each zookeeper that is used by SolrClient and issue ‘mntr’ command. Response is parsed to check to see if the zookeeper node is a leader or a follower and returned as a dict.
If the telnet collection fails or the proper response is not parsed, the zk node will be listed as ‘down’ in the dict. Desired values are either follower or leader.
-
copy_config
(original, new)¶ Copies collection configs into a new folder. Can be used to create new collections based on existing configs.
Basically, copies all nodes under /configs/original to /configs/new.
Parameters: - str (new) – ZK name of original config
- str – New name of the ZK config.
-
download_collection_configs
(collection, fs_path)¶ Downloads ZK Directory to the FileSystem.
Parameters: - str (fs_path) – Name of the collection (zk config name)
- str – Destination filesystem path.
-
get_item
(path)¶ Returns a specified zookeeper node.
-
upload_collection_configs
(collection, fs_path)¶ Uploads collection configurations from a specified directory to zookeeper.
-