Zookeeper多个集合不同的架构 [英] Zookeeper multiple collection different schema

查看:60
本文介绍了Zookeeper多个集合不同的架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带3个集合的zookeeper实例(Solr集成版本).每个集合的conf目录中都有一个不同的schema.xml.Zookeeper成功启动-目标是对不同集合进行分布式搜索.我的问题是,当我通过管理工具查看collection2和collection3的架构时,它们似乎都在使用collection1架构.因此,我无法更新收藏集2& ;;3,因为他们缺少正确的字段.

I have a zookeeper instance (Solr integrated version) with 3 collections. Each collection has a different schema.xml in it's conf directory. Zookeeper starts sucessfully - the goal is to do a distributed search across the different collections. My problem is that when I look at the schema of collection2 and collection3 via the admin tool they both appear to be using collection1 schema. So I cannot update collections 2 & 3 as they are missing their correct fields.

我尝试了以下每种启动方法都无济于事-

I have tried each of the following startup methods to no avail -

java -Dbootstrap_conf=true -DzkRun -DnumShards=1 -jar start.jar

java -DzkRun -DnumShards=1 -jar start.jar

java -Dbootstrap_confdir=solr/collection1/conf -Dcollection.configName=collection1 -DzkRun -DnumShards=1 -jar start.jar

以防它帮助我的solr.xml文件包含以下代码段-

Incase it helps my solr.xml file contains the following snippet -

<cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}" zkClientTimeout="${zkClientTimeout:15000}">
<core name="collection1" instanceDir="collection1" />
<core name="collection2" instanceDir="collection2" />
<core name="collection3" instanceDir="collection3" />

推荐答案

糟糕,我刚刚找到了解决问题的答案.

Ooops I just found the answer to my problem.

java -Dbootstrap_conf=true -DzkRun -DnumShards=1 -jar start.jar

基本上上述命令似乎不起作用,因为前一次使用以下命令已将zookeeper引导(加载了配置文件)

Basically the above command did not appear to work because zookeeper had already been bootstrapped (config files loaded) at a previous time using the following command

java -Dbootstrap_confdir=solr/collection1/conf -Dcollection.configName=collection1 -DzkRun -DnumShards=1 -jar start.jar

上面的命令意味着所有集合将使用collection1/conf中的模式.随后,使用-Dbootstrap_conf = true命令启动zookeeper无效.

The command above means all collections will use the schema in collection1/conf. Subsequently starting zookeeper with the command -Dbootstrap_conf=true had no affect.

解决方案-删除solr/zoo_data目录,然后重新运行-Dbootstrap_conf = true命令.

Solution - Remove solr/zoo_data directory and rerun the -Dbootstrap_conf=true command.

这篇关于Zookeeper多个集合不同的架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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