Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
아래에서 example/solr-webapp/WEB-INF/lib/*
org.apache.solr.cloud.ZkCLI 로 언급된것은.. 배포하는 solr-4.10.1.zip파이을 압축해제하면
ZooKeeper has a utility that lets you pass command line parameters: zkcli.bat
(for Windows environments) and zkcli.sh
(for Unix environments).
zkcli
Parameters
Short | Parameter Usage | Meaning |
---|---|---|
|
| CLI Command to be executed: |
|
| Display help text. |
|
| For |
|
| For |
|
| For |
|
| For |
|
| Run ZooKeeper internally by passing the Solr run port; only for clusters on one machine. |
|
| ZooKeeper host address. |
The short form parameter options may be specified with a single dash (eg: -c mycollection
).
The long form parameter options may be specified using either a single dash (eg: -collection mycollection
) or a double dash (eg: --collection mycollection
)
ZooKeeper CLI Examples
Below are some examples of using the zkcli
CLI:
Uploading a Configuration Directory
Put arbitrary data into a new ZK file
Put a local file into a new ZK file
Linking a Collection to a Configuration Set
Bootstrapping All the Configuration Directories in solr.xml
Scripts
There are scripts in example/cloud-scripts
that handle the classpath and class name for you if you are using Solr out of the box with Jetty. Commands then become: