使用ZooKeeper管理solrCloud配置文件
2015-03-31 17:48
483 查看
环境:
CentOS 6.5, JDK 1.7, solr 5.0.0, ZooKeeper v3.4.6
参考文档:https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities
一、solrCloud的配置文件(特别是solrconfig.xml和schema.xml)上传到ZooKeeper的三种情况:
1. 通过bin/solr脚本运行solrCloud样例程序时
eg.
$bin/solr -e cloud -noprompt
#启动solrCloud,上传默认collection [gettingstarted]和默认configset [data_driven_schema_configs], 并且关联他们
2. 通过bin/solr脚本创建一个collection时
eg.
$bin/solr create -c mycollection -d data_driven_schema_configs
#-c 指定collection名称, -d 指定configset的目录路径
#此configset被上传到ZooKeeper的/configs/mycollection目录下
3. 通过zkcli脚本手动上传
eg.
$sh <SOLR_INSTALL_HOME>/server/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost <host:port> -confname <name for configset> -solrhome <solrhome> \
-confdir <path to directory with configset>
二、命令行工具的使用 —— Solr's ZooKeeper CLI
1. 使用语法
见图:
2. 使用样例
上传配置文件目录到ZK
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd upconfig -confname my_new_config -confdir server/solr/configsets/basic_configs/conf
写任意数据到ZK文件
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd put /my_zk_file.txt 'some data'
上传本地文件到ZK
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd putfile /my_zk_file.txt /tmp/my_local_file.txt
连接collection与configset
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd linkconfig -collection gettingstarted -confname my_new_config
CentOS 6.5, JDK 1.7, solr 5.0.0, ZooKeeper v3.4.6
参考文档:https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities
一、solrCloud的配置文件(特别是solrconfig.xml和schema.xml)上传到ZooKeeper的三种情况:
1. 通过bin/solr脚本运行solrCloud样例程序时
eg.
$bin/solr -e cloud -noprompt
#启动solrCloud,上传默认collection [gettingstarted]和默认configset [data_driven_schema_configs], 并且关联他们
2. 通过bin/solr脚本创建一个collection时
eg.
$bin/solr create -c mycollection -d data_driven_schema_configs
#-c 指定collection名称, -d 指定configset的目录路径
#此configset被上传到ZooKeeper的/configs/mycollection目录下
3. 通过zkcli脚本手动上传
eg.
$sh <SOLR_INSTALL_HOME>/server/scripts/cloud-scripts/zkcli.sh -cmd upconfig -zkhost <host:port> -confname <name for configset> -solrhome <solrhome> \
-confdir <path to directory with configset>
二、命令行工具的使用 —— Solr's ZooKeeper CLI
1. 使用语法
见图:
2. 使用样例
上传配置文件目录到ZK
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd upconfig -confname my_new_config -confdir server/solr/configsets/basic_configs/conf
写任意数据到ZK文件
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd put /my_zk_file.txt 'some data'
上传本地文件到ZK
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd putfile /my_zk_file.txt /tmp/my_local_file.txt
连接collection与configset
./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 -cmd linkconfig -collection gettingstarted -confname my_new_config
相关文章推荐
- 使用外部zookeeper 在tomcat下配置solrcloud
- zookeeper管理solr的配置文件
- 更新solrcloud+zookeeper的配置文件,要reload collection
- 更新solrcloud+zookeeper的配置文件,要reload collection
- Solr之ZooKeeper管理配置文件-yellowcong
- zookeeper 管理 solrcloud 的配置以及安装 步骤
- [置顶] 上传solrcloud的配置文件到zookeeper
- Mysql系列九:使用zookeeper管理远程Mycat配置文件、Mycat监控、Mycat数据迁移(扩容)
- 使用阿里云ACM简化你的Spring Cloud微服务环境配置管理
- spring-01 spring的bean管理(使用配置文件方式创建对象 附代码)
- Spring Cloud Config 使用本地配置文件
- Spring中bean管理-配置文件和注解方式混合使用
- spring管理属性配置文件properties——使用PropertiesFactoryBean
- spring cloud :统一管理配置文件config
- SpringCloud系列九:SpringCloudConfig 基础配置(SpringCloudConfig 的基本概念、配置 SpringCloudConfig 服务端、抓取配置文件信息、客户端使用 SpringCloudConfig 进行配置、单仓库目录匹配、应用仓库自动选择、仓库匹配模式)
- spring cloud使用zookeeper作为服务注册中心和配置中心
- Spring Cloud Config - RSA简介以及使用RSA加密配置文件
- Spring Cloud Config - RSA简介以及使用RSA加密配置文件
- Spring Cloud Config RSA简介及使用RSA加密配置文件的方法
- Spring Cloud Config配置文件使用对称加密的方法