如何在solr云中拆分solr shard

时间:2015-02-12 07:37:32

标签: java apache solr solrcloud

我在solrCloud模式下使用solr 4.10.3。我有一个碎片和3个复制品。正在使用的外部动物园管理员合奏。我在一个索引中的文档增加了太多。现在我想创建更多分片。我尝试使用

http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1

但它会出现以下错误

Error executing split operation for collection: collection1 parent shard: shard1
java.lang.NullPointerException
    at org.apache.solr.cloud.OverseerCollectionProcessor.splitShard(OverseerCollectionProcessor.java:1288)
    at org.apache.solr.cloud.OverseerCollectionProcessor.processMessage(OverseerCollectionProcessor.java:563)
    at org.apache.solr.cloud.OverseerCollectionProcessor$Runner.run(OverseerCollectionProcessor.java:2629)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Collection: collection1 operation: splitshard failed:org.apache.solr.common.SolrException
    at org.apache.solr.cloud.OverseerCollectionProcessor.splitShard(OverseerCollectionProcessor.java:1569)
    at org.apache.solr.cloud.OverseerCollectionProcessor.processMessage(OverseerCollectionProcessor.java:563)
    at org.apache.solr.cloud.OverseerCollectionProcessor$Runner.run(OverseerCollectionProcessor.java:2629)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at org.apache.solr.cloud.OverseerCollectionProcessor.splitShard(OverseerCollectionProcessor.java:1288)
null:org.apache.solr.common.SolrException
null:org.apache.solr.common.SolrException
    at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:364)
    at org.apache.solr.handler.admin.CollectionsHandler.handleSplitShardAction(CollectionsHandler.java:606)
    at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:172)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)

问题在哪里?它的灵魂是什么?

1 个答案:

答案 0 :(得分:1)

属性SPLITSHARD只能在第一次启动集群时定义-DnumShards =(某个值)时使用。