Solrcloud删除收集错误? [英] Solrcloud delete collection bug?

查看:83
本文介绍了Solrcloud删除收集错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我创建一个名为 usercollection 的集合:

First,I create a collection called usercollection:

http://xxxxx/solr/admin/collections?action=CREATE&name=usercollection&numShards=3&replicationFactor=3&maxShardsPerNode=3

然后我发现了问题,因此将其删除.

Then I found something wrong, so I delete it.

 http://xxxx/solr/admin/collections?action=DELETE&name=usercollection

最后,我想再次创建集合.而且我发现了问题.

At last ,I want to create the collection again. And I found something wrong.

`May 16, 2013 8:32:23 PM org.apache.solr.cloud.OverseerCollectionProcessor run
 INFO: Overseer Collection Processor: Get the message id:/overseer/collection-queue-    work/qn-0000000000 message:{
"operation":"createcollection",
"numShards":"3",
"maxShardsPerNode":"3",
"createNodeSet":null,
"name":"usercollection",
"replicationFactor":"3"}
May 16, 2013 8:32:23 PM org.apache.solr.common.SolrException log
SEVERE: Collection createcollection of createcollection           failed:org.apache.solr.common.SolrException: collection already exists: usercollection
    at org.apache.solr.cloud.OverseerCollectionProcessor.createCollection(OverseerCollectionProcessor.java:311)
    at org.apache.solr.cloud.OverseerCollectionProcessor.processMessage(OverseerCollectionProcessor.java:160)
    at org.apache.solr.cloud.OverseerCollectionProcessor.run(OverseerCollectionProcessor.java:112)
    at java.lang.Thread.run(Thread.java:662)`

因此,我认为集合API在删除时出了点问题.因此,我该如何真正删除集合?

So, I think the collection API has something wrong when delete.Thus, how can I really delete a collection?

推荐答案

出现了同样的问题,最终通过使用Solr提供的zkcli.sh在zookeeper中手动编辑和更新clusterstate.json来解决.

Had the same problem and ended up resolving by manually editing and updating clusterstate.json in zookeeper using zkcli.sh provided with Solr.

  1. 下载clusterstate.json:

  1. Download clusterstate.json:

zkcli.sh -z zk主机名-cmd getfile/clusterstate.json clusterstateLoca.json

zkcli.sh -z zk-host-name -cmd getfile /clusterstate.json clusterstateLoca.json

编辑下载的clusterstateLocal.json,删除已删除集合的节点,在本地保存clusterstateLocal.json.

Edit the downloaded clusterstateLocal.json, remove the nodes for the deleted collection, save clusterstateLocal.json locally.

从ZK删除过时的clusterstate.json

Remove stale clusterstate.json from ZK

zkcli.sh -z zk主机名-cmd clear/clusterstate.json

zkcli.sh -z zk-host-name -cmd clear /clusterstate.json

将修改后的clusterstate.json上载到ZK:

Upload modified clusterstate.json to ZK:

zkcli.sh -z zk主机名-cmd putfile/clusterstate.json ./clusterstateLocal.json

zkcli.sh -z zk-host-name -cmd putfile /clusterstate.json ./clusterstateLocal.json

这篇关于Solrcloud删除收集错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆