在分布式Solr配置中复制(Replication in distributed Solr config)
我试图为Solr云中的每个从节点添加复制 ,以使整个群集更加可靠。 这个想法是将一个碎片分散到几台机器上,即使其中一台机器停机,也能让群集工作。
Solr具有出色的内置复制功能 ,在正常(未分配)的Solr设置中完美工作。 但是,在将此功能添加到Solr云中时,出现错误,告诉我找不到
/solr/replication
处理程序(实际上,它在启动Solr时未出现在Solr输出中,尽管它在solrconfig.xml
定义)。SolrWiki也指向分布式更新处理程序 ,但从作者的笔记中我明白它并不实际复制数据,而只是将新文档发送到config中定义的其中一个节点 。
我的问题是:
- 为什么内置的基于Java的复制在分布式Solr设置中不起作用 ? 这是Solr云的问题,更基本的问题还是只是在我的配置错误(我检查了几次,但仍然可能会错过什么)?
- 在分布式Solr中复制的其他好方法是什么?
I'm trying to add replication for every slave in Solr cloud to make the whole cluster more reliable. The idea is to spread one shard to several machines to let the cluster work even if one of machines is down.
Solr has excellent built-in replication feature, that works perfectly in the normal (not distibuted) Solr setup. However, when adding this feature to Solr cloud, I get an error, telling that
/solr/replication
handler is not found (and actually it doesn't appear in Solr output when starting Solr, though it is defined insolrconfig.xml
).SolrWiki also points to distributed update handler, but from author's note I understand it doesn't actually replicate data, but just sends new documents to one of nodes defined in config.
My questions are:
- Why built-in Java-based replication doesn't work in distributed Solr setup? Is it an issue with the Solr cloud, more fundamental problem or just error in my configuration (I checked everything several times, but still could miss something)?
- What are other good approaches to replication in distributed Solr?
原文:https://stackoverflow.com/questions/7988994
最满意答案
相关问答
更多-
您可以使用-S为已提交的作业(至少在Torque中)设置shell。 例如: qsub shell_sub -S /bin/bash You can set the shell for a submitted job (at least in Torque) using -S. For example: qsub shell_sub -S /bin/bash
-
您应该使用#!/usr/bin/env bash来进行可移植性 :不同的* nixes将bash放在不同的地方,并且使用/usr/bin/env是运行PATH上找到的第一个bash的解决方法。 而sh不是bash 。 You should use #!/usr/bin/env bash for portability: different *nixes put bash in different places, and using /usr/bin/env is a workaround to run th ...
-
只需使用/path/to/executable "$val" 。 更新 如果变量在" (如csh -cf "test.csh $tst1" )中扩展并且要保留特殊字符和多个单词,那么这些单词必须被引用。但是bash的特殊printf并不是必不可少的这个;我们可以做到这一点,例如: set tst1q=`printf " '%s'" $tst1:q` csh -cf "test.csh $tst1q" (没有%q的普通printf )。 更新 要允许"和' ,你可以在你最初做完之后 set s='s ...
-
如果bash脚本的全部目的是导出相关的env变量,我建议你将脚本作为bash运行,使用csh调用以下脚本。 例如: #!/bin/bash source ~arovit/RTM_test/unit_RTM/fail.10/failure.001.sh csh -x your_csh_script.sh 如果bash脚本没有导出变量,并且只是执行一些任务,则反过来执行: #!/bin/csh -x bash ~arovit/RTM_test/unit_RTM/fail.10/failure.001.sh < ...
-
bash / csh - 回显字符串“$#argv”和“#!/ bin / csh”(bash/csh - echo the strings “$#argv” and “#!/bin/csh”)[2023-06-08]
csh - 类似于POSIX类shell - 使用单引号字符串( '...' )表示文字字符串 (不受shell扩展影响的字符串 ) - 与双引号字符串( "..." )形成对比,其中扩展了 $ -prefixed引用(插入,立即) 。 因此,以下命令应该起作用: % echo '$#argv' #argv 但是, 解释! - 命令历史记录功能 - 甚至在通常的shell扩展之前 ,因此需要使用\进行额外的转义层 : % echo '#\!/bin/csh' #!/bin/csh 此外 - 再次,如在P ... -
对于Linux,我认为我们应该使用像pid.sessionname这样的pid.sessionname 。 对于其他类Unix操作系统,它也可能表示像这个pid.tty.sessionname这样的TTY。 请务必参考屏幕联机帮助页面: man screen For Linux, I think we should just use something like pid.sessionname. For other Unix-like OS, it may also indicate the TTY lik ...
-
您需要分两步完成,并且显然也使用单引号: tempvar='#!/bin/bash\necho configvalue' alias createConfiger='echo -e "$tempvar" > printConfig.sh' You need to do it in two steps, and apparently use single-quotes as well: tempvar='#!/bin/bash\necho configvalue' alias createConfiger= ...
-
在shebang路径(path in shebang)[2022-10-13]
你可以随时尝试 #!/usr/bin/env bash you can always try #!/usr/bin/env bash -
使用foreach和awk命令将csh脚本转换为bash脚本(Convert csh script to bash script with foreach and awk commands)[2022-10-03]
更正确的方法(参见Bash FAQ 001 )是 while IFS= read -r xmlfile; do printf '%s' "$xmlfile" head -c 1000 "$xmlfile" | awk -F'[="]' '{print $15,"|",$21}' done < ~/reportlist.txt 使用awk以这种方式解析XML是脆弱的,不推荐使用。 但是,如果没有看到有问题的XML,我不能推荐更好的解决方案。 The more correct way to d ... -
没有任何“shebang选项”。 任何选项都有在shebang中的二进制选项。 所以这是一个csh选项。 具体来说(从手册页 ): -F 外壳的启动速度会更快,因为它既不会搜索也不会从调用者的主目录中的文件.cshrc执行命令。 注意:如果没有设置环境变量HOME,则快速启动是默认设置。 There aren't any "shebang options". Any options there are options to the binary in the shebang. So that's a csh ...