13.2SolrCloud集群使用手册之CoreAdmin API

转载请出自出处:http://www.cnblogs.com/hd3013779515/

CoreAdminHandler是用来管理Solr cores的,用来管理一个Solr instance中所有的cores。

1. 查看状态STATUS

http://192.168.137.171:8080/solr-cloud/admin/cores?action=STATUS

2.创建Core


name


The name of the new core. Same as "name" on the <core> element.


instanceDir


The directory where files for this SolrCore should be stored. Same as instanceDir on the <core> element.


config


(Optional) Name of the config file (solrconfig.xml) relative to instanceDir.


schema


(Optional) Name of the schema file (schema.xml) relative to instanceDir.


datadir


(Optional) Name of the data directory relative to instanceDir.


configSet


(Optional) Name of the configset to use for this core (see Config Sets)


collection


(Optional) The name of the collection to which this core belongs. The default is the name of the core. collection.<param>=<value> causes a property of <param>=<value> to be set if a new collection is being created. Use collection.configName=<configname> to point to the configuration for a new collection.


shard


(Optional) The shard id this core represents. Normally you want to be auto-assigned a shard id.


property.name=value


(Optional) Sets the core property name to value. See core.properties file contents.


async


(Optional) Request ID to track this action which will be processed asynchronously

(1)增加shard3的第一个replica(指定core名字和目录)

http://192.168.137.171:8080/solr-cloud/admin/cores?action=CREATE&name=myc2_s3_r1&instanceDir=myc2_s3_r1_t&collection=myc2&shard=shard3

(2)增加shard3的第二个replica(指定配置文件)

http://192.168.137.172:8080/solr-cloud/admin/cores?action=CREATE&name=myc2_s3_r2&instanceDir=myc2_s3_r2&collection=myc2&shard=shard3&config=solrconfig2.xml&schema=schema2.xml

(3)新建collection(增加shard1的第一个replica)

http://192.168.137.171:8080/solr-cloud/admin/cores?action=CREATE&name=myc3_s1_r1&instanceDir=myc3_s1_r1&collection=myc3&shard=shard1&configSet=myconf&collection.configName=myconf2

3.刷新core

当core的配置文件有变化时,可以reload一下。采用的是无缝连接方式。

http://192.168.137.171:8080/solr-cloud/admin/cores?action=RELOAD&core=myc3_s1_r1

4.重命名core

http://192.168.137.171:8080/solr-cloud/admin/cores?action=RENAME&core=myc3_s1_r1&other=coreother

5.交换core

交换core的名字,可以把待机core升格为livecore,同时保持可以恢复livecore。

官方示例:http://localhost:8983/solr/admin/cores?action=SWAP&core=core1&other=core0

6.下线core

官方示例:http://localhost:8983/solr/admin/cores?action=UNLOAD&core=core0

7.合并索引

官方示例:

方式1:http://localhost:8983/solr/admin/cores?action=MERGEINDEXES&core=core0&indexDir=/opt/solr/core1/data/index&indexDir=/opt/solr/core2/data/index

方式2:http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&srcCore=core1&srcCore=core2

8.切分

官方示例:http://localhost:8983/solr/admin/cores?action=SPLIT&core=core0&targetCore=core1&targetCore=core2

可选参数:


Parameter


Description


Multi-valued


core


The name of the core to be split.


false


path


The directory path in which a piece of the index will be written.


true


targetCore


The target Solr core to which a piece of the index will be merged


true


ranges


A comma-separated list of hash ranges in hexadecimal format


false


split.key


The key to be used for splitting the index


false


async


(Optional) Request ID to track this action which will be processed asynchronously


false

9.查看请求状态

官方示例:http://localhost:8983/solr/admin/cores?action=REQUESTSTATUS&requestid=1

时间: 2024-08-27 08:08:30

13.2SolrCloud集群使用手册之CoreAdmin API的相关文章

13.1SolrCloud集群使用手册之Collections API

转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.创建collection name:指明collection名字 router.name:指定路由策略,默认为compositeId路由 numShards:collection的逻辑分片数量 shards:指定具体的shard列表 replicationFactor:一个分片的replicas数量 maxShardsPerNode :一个solr节点上可以创建的逻辑分片数量,默认值为1 createN

13.3SolrCloud集群使用手册之Zookeeper指令

转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.upconfig java -classpath .:/home/solr/cloud/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 192.168.137.171:2181,192.168.137.172:2181,192.168.137.173:2181 -confdir /home/solr/cloud/multicore/coll

Rabbitmq集群部署手册

一.Rabbitmq集群部署手册 1.环境介绍 系统环境:Red HatEnterprise Linux Server release 6.2 (Santiago) 内核版本:Linux zxt-02.com2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64GNU/Linux 软件版本:otp_src_17.3:rabbitmq-server-3.2.4:Python 2.6.6:simple

storm集群部署手册

一.  准备 1.  硬件 三台装好RHEL6.7_x64的x86服务器,机器名如下 storm01 storm02 storm03 2.  软件 jdk-7u80-linux-x64.rpm apache-storm-1.0.1.zip 3.  zookeeper storm需用到zookeeper,开始安装前先安装好zookeeper,参照zookeeper集群部署手册 4.  Python storm需用到python,一般Linux都有python,这里需要python 2.6.6,如没

Nginx+Tomcat+MemCached 集群配置手册

系统实施文档 Nginx+Tomcat+MemCached 集群配置手册 目    录 第1章   概述 1.1   目标 互联网的快速发展带来了互联网系统的高负载和高可用性, 这要求我们在设计系统架构时会应用很多高性能的产品, 本文主要描述互联网架构中门户应用的集群的配置工作,最终用以指导系统实施. 1.2   预期读者 本文档用于指导系统工程师进行系统实施工作,架构师和系统工程师应该通读本文档,选择适当版本用于自己的系统架构. 第2章   产品介绍 2.1   Nginx介绍 Nginx是一

ubuntu12.04+kafka2.9.2+zookeeper3.4.5的分布式集群安装和demo(java api)测试

博文作者:迦壹 博客地址:http://idoall.org/home.php?mod=space&uid=1&do=blog&id=547 转载声明:可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明,谢谢合作! --------------------------------------- 目录: 一.什么是kafka? 二.kafka的官方网站在哪里? 三.在哪里下载?需要哪些组件的支持? 四.如何安装? 五.FAQ 六.扩展阅读 一.什么是kafka? ka

kafka2.9.2的分布式集群安装和demo(java api)测试

目录: 一.什么是kafka? 二.kafka的官方网站在哪里? 三.在哪里下载?需要哪些组件的支持? 四.如何安装? 五.FAQ 六.扩展阅读   一.什么是kafka? kafka是LinkedIn开发并开源的一个分布式MQ系统,现在是Apache的一个孵化项目.在它的主页描述kafka为一个高吞吐量的分布式(能将消息分散到不同的节点上)MQ.Kafka仅仅由7000行Scala编写,据了解,Kafka每秒可以生产约25万消息(50 MB),每秒处理55万消息(110 MB). kafka目

OEMCC 13.2 集群版本安装部署

之前测试部署过OEMCC 13.2单机,具体可参考之前随笔: OEMCC 13.2 安装部署 当时环境:两台主机,系统RHEL 6.5,分别部署OMS和OMR: OMS,也就是OEMCC的服务端 IP:192.168.1.88 内存:12G+ 硬盘:100G+ OMR,也就是OEM底层的资料库 IP:192.168.1.89 内存:8G+ 硬盘:100G+ 相当于OMS和OMR都是单机版,然后有些客户对监控系统的要求也很高,这就需要集群来提升高可用性. 对于OMR来说,可以搭建对应版本的RAC来

k8s v1.13.4 集群部署

部署环境 主机节点清单 服务器名 ip地址 etcd K8S server K8s node node01 172.16.50.111 Y Y node02 172.16.50.113 Y Y node03 172.16.50.115 Y Y node04 172.16.50.116 Y node05 172.16.50.118 Y node06 172.16.50.120 Y node07 172.16.50.128 Y 版本信息 Linux版本:CentOS 7.6.1810 内核版本:3.