Zookeeper 多个集合不同的模式 [英] Zookeeper multiple collection different schema

查看:28
本文介绍了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天全站免登陆