solr集群管理
来源:互联网 发布:淘宝不错的睡衣店知乎 编辑:程序博客网 时间:2024/06/05 14:22
在九个节点上设置三个shard三个replica,指定在每个节点上均匀分配的创建collection方式
curl 'http://localhost:8991/solr/admin/collections?action=CREATE&name='$name'&numShards=3&replicationFactor=1&collection.configName='$name'&createNodeSet=search-1.xxxxxxxxxx.com:8991_solr,search-1.xxxxxxxxxx.com:8992_solr,search-1.xxxxxxxxxx.com:8993_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard1&node=search-1.xxxxxxxxxx.com:8991_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard1&node=search-2.xxxxxxxxxx.com:8991_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard1&node=search-3.xxxxxxxxxx.com:8991_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard2&node=search-1.xxxxxxxxxx.com:8992_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard2&node=search-2.xxxxxxxxxx.com:8992_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard2&node=search-3.xxxxxxxxxx.com:8992_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard3&node=search-1.xxxxxxxxxx.com:8993_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard3&node=search-2.xxxxxxxxxx.com:8993_solr'curl 'http://localhost:8991/solr/admin/collections?action=ADDREPLICA&collection='$name'&shard=shard3&node=search-3.xxxxxxxxxx.com:8993_solr'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard1&replica=core_node1'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard1&replica=core_node2'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard1&replica=core_node3'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard2&replica=core_node1'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard2&replica=core_node2'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard2&replica=core_node3'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard3&replica=core_node1'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard3&replica=core_node2'curl 'http://localhost:8991/solr/admin/collections?action=DELETEREPLICA&collection='$name'&shard=shard3&replica=core_node3'
state.json
{"ext_quest":{ "shards":{ "shard1":{ "range":"80000000-d554ffff", "state":"active", "replicas":{ "core_node4":{ "state":"active", "core":"ext_quest_shard1_replica2", "node_name":"search-2.xxxxxxxxxx.com:8991_solr", "base_url":"http://search-2.xxxxxxxxxx.com:8991/solr"}, "core_node5":{ "state":"active", "core":"ext_quest_shard1_replica3", "node_name":"search-1.xxxxxxxxxx.com:8991_solr", "base_url":"http://search-1.xxxxxxxxxx.com:8991/solr"}, "core_node10":{ "state":"active", "core":"ext_quest_shard1_replica4", "node_name":"search-3.xxxxxxxxxx.com:8991_solr", "base_url":"http://search-3.xxxxxxxxxx.com:8991/solr", "leader":"true"}}}, "shard2":{ "range":"d5550000-2aa9ffff", "state":"active", "replicas":{ "core_node6":{ "state":"active", "core":"ext_quest_shard2_replica2", "node_name":"search-2.xxxxxxxxxx.com:8992_solr", "base_url":"http://search-2.xxxxxxxxxx.com:8992/solr"}, "core_node7":{ "state":"active", "core":"ext_quest_shard2_replica3", "node_name":"search-1.xxxxxxxxxx.com:8992_solr", "base_url":"http://search-1.xxxxxxxxxx.com:8992/solr"}, "core_node11":{ "state":"active", "core":"ext_quest_shard2_replica4", "node_name":"search-3.xxxxxxxxxx.com:8992_solr", "base_url":"http://search-3.xxxxxxxxxx.com:8992/solr", "leader":"true"}}}, "shard3":{ "range":"2aaa0000-7fffffff", "state":"active", "replicas":{ "core_node8":{ "state":"active", "core":"ext_quest_shard3_replica2", "node_name":"search-2.xxxxxxxxxx.com:8993_solr", "base_url":"http://search-2.xxxxxxxxxx.com:8993/solr"}, "core_node9":{ "state":"active", "core":"ext_quest_shard3_replica3", "node_name":"search-1.xxxxxxxxxx.com:8993_solr", "base_url":"http://search-1.xxxxxxxxxx.com:8993/solr"}, "core_node12":{ "state":"active", "core":"ext_quest_shard3_replica4", "node_name":"search-3.xxxxxxxxxx.com:8993_solr", "base_url":"http://search-3.xxxxxxxxxx.com:8993/solr", "leader":"true"}}}}, "maxShardsPerNode":"1", "router":{"name":"compositeId"}, "replicationFactor":"1", "autoAddReplicas":"false"}}
1. 区分solr实例, core, collection, shard, replica 概念
2. create集合的重要参数, numshard, replicafactor, createnodeset
addreplica的重要参数 shard(shard1,shard2...), node(search-2.xxxxxxxxxx.com:8993_solr..)
deletereplica 的重要参数 shard , replica(core_node1,core_node2...)
3. 以上参数对应的value
阅读全文
0 0
- solr集群管理
- Solr集群搭建,zookeeper集群搭建,Solr分片管理,Solr集群下的DataImport,分词配置。
- Solr集群搭建,zookeeper集群搭建,Solr分片管理,Solr集群下的DataImport,分词配置。
- Solr之集群管理Collection-yellowcong
- Solr(四)——Java使用solrj管理solr集群
- Solr 单机搭建 && Solr 集群搭建(集群交给Zookeeper管理)
- solr 集群
- solr集群
- Solr集群
- Solr集群
- solr集群
- Solr集群
- solr集群
- solr集群
- 淘淘商城系列——使用SolrJ管理Solr集群
- 【Solr】 Solr集群概念介绍
- Solr集群的搭建(solr集群架构 solr部分)
- solr集群环境搭建
- 关于构造器
- Intel, AMD及VIA CPU的微架构(10)
- 双语web阅读器+书城设计与实现
- ubuntu nsq安装与配置
- Java @Override的作用
- solr集群管理
- iOS中 @try 和@catch
- SQL学习笔记[7]
- 记录一个由于代码写错导致的一个掉咋天的动画
- Bmp图片解析
- DOM级别
- 建立数据库关系图之 “ALTER TABLE 语句与 COLUMN FOREIGN KEY 约束冲突”
- jQuery的on函数的用法,如on click,on change,但是on函数
- webview图片缩放,字体大小设置,打电话