Table des matières

Commandes utiles pour le client Zookeeper

Attention:

Le Cli zookeeper est différent de celui livré par SOLR, les deux interagissent avec Zookeeper, mais les commandes proposés sont différentes.
Prenez garde à utiliser le Cli Zookeeper de SOLR.

Exemples de commandes:

zkcli.sh -zkhost localhost:2181/solr -cmd bootstrap -solrhome /opt/solr
zkcli.sh -zkhost localhost:2181/solr -cmd upconfig -confdir /opt/solr/collection1/conf -confname myconf
zkcli.sh -zkhost localhost:2181/solr -cmd downconfig -confdir /opt/solr/collection1/conf -confname myconf
zkcli.sh -zkhost localhost:2181/solr -cmd linkconfig -collection collection1 -confname myconf
zkcli.sh -zkhost localhost:2181/solr -cmd makepath /apache/solr
zkcli.sh -zkhost localhost:2181/solr -cmd put /solrconf 'conf data'
zkcli.sh -zkhost localhost:2181/solr -cmd putfile /solr.xml /User/myuser/solr/solr.xml
zkcli.sh -zkhost localhost:2181/solr -cmd get /solr.xml
zkcli.sh -zkhost localhost:2181/solr -cmd getfile /solr.xml solr.xml
zkcli.sh -zkhost localhost:2181/solr -cmd clear /solr
zkcli.sh -zkhost localhost:2181/solr -cmd list
zkcli.sh -zkhost localhost:2181/solr -cmd ls /solr/live_nodes
zkcli.sh -zkhost localhost:2181/solr -cmd clusterprop -name urlScheme -val https
zkcli.sh -zkhost localhost:2181/solr -cmd updateacls /solr

Récupérer un fichier de configuration d'une collection dans Zookeeper

zkcli.sh -zkhost localhost:2181/solr -cmd getfile /configs/<nom_de_la_collection>/solrconfig.xml solrconfig.xml

Envoyer un fichier de configuration d'une collection dans Zookeeper

zkcli.sh -zkhost localhost:2181/solr -cmd putfile /configs/<nom_de_la_collection>/solrconfig.xml solrconfig.xml

Récupérer un dossier de configuration d'une collection dans Zookeeper

zkcli.sh -zkhost localhost:2181/solr -cmd downconfig -confdir /var/tmp/my_conf -confname <nom_de_la_collection>

Envoyer un dossier de configuration d'une collection dans Zookeeper

zkcli.sh -zkhost localhost:2181/solr -cmd upconfig -confdir /var/tmp/my_conf -confname <nom_de_la_collection>