内置jetty server下solrcloud6.2.1和Zookeeper集群如何安装和配置过程

发布时间:2021-12-20 11:49:46 作者:小新
来源:亿速云 阅读:189

小编给大家分享一下内置jetty server下solrcloud6.2.1和Zookeeper集群如何安装和配置过程,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

环境介绍:
两台虚拟机:192.168.0.1和192.168.0.2
系统和软件版本:centos6.8 zookeeper-3.4.10 solr-6.2.1

一.zookeeper集群安装
下载 zookeeper-3.4.10并解压
# cd /data/solrcloud/
# tar zxvf zookeeper-3.4.10.tar.gz

在zookeeper目录里创建 data和log目录用于存放数据
# cd /data/solrcloud/zookeeper-3.4.10
# mkdir -p data log

拷贝zookeeper的配置文件zoo_sample.cfg为zoo.cfg
# cp conf/zoo_sample.cfg  conf/zoo.cfg

编辑配置文件zoo.cfg,并加入如下内容:
vi conf/zoo.cfg

dataDir=/data/solrcloud/zookeeper-3.4.10/data
dataLogDir=/data/solrcloud/zookeeper-3.4.10/log

server.1=192.168.0.1:2888:3888
server.2=192.168.0.2:2888:3888

保存退出

在zookeeper中的data目录里需要创建myid文件,并写入对应的数字
conf/zoo.cfg里:
server.1对应的机器上写入1
server.2对应的机器上写入2

192.168.0.1上写入1
#cd /data/solrcloud/zookeeper-3.4.10/data
# echo 1 > myid

同理,另外一台写入2:
# echo 2 > myid

分别在两台机器上启动zookeeper集群
# cd /data/solrcloud/zookeeper-3.4.10/bin
# ./zkServer.sh start

查看集群状态
# ./zkServer.sh status

安装成功应该是一个为leader,1个为follower
# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/solrcloud/zookeeper-3.4.10/bin/../conf/zoo.cfg
Mode: leader

另外一台:
]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /data/solrcloud/zookeeper-3.4.10/bin/../conf/zoo.cfg
Mode: follower

solrcould安装

解压solr-6.2.1.tgz并重命名为solr,然后修改bin目录下的solr.in.sh文件内容:
SOLR_JAVA_MEM="-Xms10G -Xmx10G" (此处根据内存大小做适当修改,本例为10G)
加入ZK_HOST
ZK_HOST="192.168.0.1:2181,192.168.0.2:2181"
去掉 ZK_CLIENT_TIMEOUT 的注释
ZK_CLIENT_TIMEOUT="15000"

配置solr中文分词器
拷贝IKAnalyzer-2016_FS.jar文件到solr/server/solr-webapp/webapp/WEB-INF/lib目录下


创建用于存放上传的配置文件的solrhome目录,然后拷贝配置文件
# mkdir -p /data/solrcloud/solrhome/myconf
# cp -r /data/solrcloud/solr/example/example-DIH/solr/solr/conf  /data/solrcloud/solrhome/myconf

myconf中conf下的solrconfig.xml及managed-schema内容需要修改,具体内容可以参考以下配置:

 managed-schema内容:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Solr managed schema - automatically generated - DO NOT EDIT -->
<schema name="nutch" version="1.6">
  <uniqueKey>kvUuid</uniqueKey>
  <defaultSearchField>kvTitle</defaultSearchField>
  <solrQueryParser defaultOperator="AND"/>
  <fieldType name="ancestor_path" class="solr.TextField">
    <analyzer type="index">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/"/>
    </analyzer>
  </fieldType>
  <fieldType name="binary" class="solr.BinaryField"/>
  <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
  <fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
  <fieldType name="currency" class="solr.CurrencyField" currencyConfig="currency.xml" defaultCurrency="USD" precisionStep="8"/>
  <fieldType name="date" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
  <fieldType name="dates" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
  <fieldType name="descendent_path" class="solr.TextField">
    <analyzer type="index">
      <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.KeywordTokenizerFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="double" class="solr.TrieDoubleField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
  <fieldType name="doubles" class="solr.TrieDoubleField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
  <fieldType name="float" class="solr.TrieFloatField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
  <fieldType name="floats" class="solr.TrieFloatField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
  <fieldType name="ignored" class="solr.StrField" indexed="false" stored="false" docValues="false" multiValued="true"/>
  <fieldType name="int" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
  <fieldType name="ints" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
  <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" maxDistErr="0.001" distErrPct="0.025" distanceUnits="kilometers"/>
  <fieldType name="long" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" precisionStep="0"/>
  <fieldType name="longs" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="0"/>
  <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="phonetic_en" class="solr.TextField" indexed="true" stored="false">
    <analyzer>
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
    </analyzer>
  </fieldType>
  <fieldType name="point" class="solr.PointType" subFieldSuffix="_d" dimension="2"/>
  <fieldType name="random" class="solr.RandomSortField" indexed="true"/>
  <fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
  <fieldType name="strings" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true"/>
  <fieldType name="tdate" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" precisionStep="6"/>
  <fieldType name="tdates" class="solr.TrieDateField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="6"/>
  <fieldType name="tdouble" class="solr.TrieDoubleField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
  <fieldType name="tdoubles" class="solr.TrieDoubleField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
  <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
    <analyzer type="index">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.EnglishPossessiveFilterFactory"/>
      <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
      <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.EnglishPossessiveFilterFactory"/>
      <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
      <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_en_splitting" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100">
    <analyzer type="index">
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
      <filter class="solr.WordDelimiterFilterFactory" catenateNumbers="1" generateNumberParts="1" splitOnCaseChange="1" generateWordParts="1" catenateAll="0" catenateWords="1"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
      <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
      <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
      <filter class="solr.WordDelimiterFilterFactory" catenateNumbers="0" generateNumberParts="1" splitOnCaseChange="1" generateWordParts="1" catenateAll="0" catenateWords="0"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
      <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_en_splitting_tight" class="solr.TextField" autoGeneratePhraseQueries="true" positionIncrementGap="100">
    <analyzer>
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
      <filter class="solr.SynonymFilterFactory" expand="false" ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
      <filter class="solr.WordDelimiterFilterFactory" catenateNumbers="1" generateNumberParts="0" generateWordParts="0" catenateAll="0" catenateWords="1"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
      <filter class="solr.EnglishMinimalStemFilterFactory"/>
      <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
    <analyzer type="index">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
      <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
    <analyzer type="index">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
      <filter class="solr.ReversedWildcardFilterFactory" maxPosQuestion="2" maxFractionAsterisk="0.33" maxPosAsterisk="3" withOriginal="true"/>
    </analyzer>
    <analyzer type="query">
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.SynonymFilterFactory" expand="true" ignoreCase="true" synonyms="synonyms.txt"/>
      <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
      <filter class="solr.LowerCaseFilterFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
    <analyzer>
      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    </analyzer>
  </fieldType>
  <fieldType name="text_zh" class="solr.TextField">
    <analyzer class="org.wltea.analyzer.lucene.IKAnalyzer"/>
  </fieldType>
  <fieldType name="tfloat" class="solr.TrieFloatField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
  <fieldType name="tfloats" class="solr.TrieFloatField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
  <fieldType name="tint" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
  <fieldType name="tints" class="solr.TrieIntField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
  <fieldType name="tlong" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" precisionStep="8"/>
  <fieldType name="tlongs" class="solr.TrieLongField" positionIncrementGap="0" docValues="true" multiValued="true" precisionStep="8"/>
  <field name="ARTICLEID" type="string" indexed="true" stored="true"/>
  <field name="ARTICLESITE" type="text_zh" indexed="true" stored="true"/>
  <field name="ARTICLESITEID" type="string" indexed="true" stored="true"/>
  <field name="CLASSLYID" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="DATATYPE" type="string" indexed="true" stored="true"/>
  <field name="FILEPATH" type="string" indexed="false" stored="true"/>
  <field name="JZ" type="string" indexed="true" stored="true"/>
  <field name="MUTISITE" type="text_zh" indexed="true" stored="true"/>
  <field name="_version_" type="long" indexed="true" stored="false"/>
  <field name="copy_cday" type="string" indexed="true" stored="false"/>
  <field name="copy_chour" type="string" indexed="true" stored="false"/>
  <field name="copy_cmonth" type="string" indexed="true" stored="false"/>
  <field name="copy_cyear" type="string" indexed="true" stored="false"/>
  <field name="copy_site" type="string" indexed="true" stored="false"/>
  <field name="copy_source" type="string" indexed="true" stored="false"/>
  <field name="copy_title" type="string" indexed="true" stored="false"/>
  <field name="ismyattention" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="isread" type="int" indexed="true" stored="true"/>
  <field name="isyj" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="keyword" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="krInfotype" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="krIslocal" type="int" indexed="true" stored="true"/>
  <field name="krKeywordid" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="krState" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="krUid" type="string" multiValued="true" indexed="true" stored="true"/>
  <field name="kvAbstract" type="text_zh" indexed="true" stored="true"/>
  <field name="kvAuthor" type="text_zh" indexed="true" stored="true"/>
  <field name="kvCollection" type="int" indexed="true" stored="true"/>
  <field name="kvContent" type="text_zh" indexed="true" stored="true"/>
  <field name="kvCtime" type="string" indexed="true" stored="true"/>
  <field name="kvDkTime" type="string" indexed="true" stored="true"/>
  <field name="kvISYJ" type="int" indexed="false" stored="true"/>
  <field name="kvOrienLevel" type="int" indexed="true" stored="true"/>
  <field name="kvOrientation" type="int" indexed="true" stored="true"/>
  <field name="kvReply" type="int" indexed="true" stored="true"/>
  <field name="kvSite" type="text_zh" indexed="true" stored="true"/>
  <field name="kvSource" type="text_zh" indexed="true" stored="true"/>
  <field name="kvSourcetype" type="int" indexed="true" stored="true"/>
  <field name="kvState" type="string" indexed="true" stored="true"/>
  <field name="kvTitle" type="text_zh" indexed="true" stored="true"/>
  <field name="kvUrl" type="string" indexed="false" stored="true"/>
  <field name="kvUserPic" type="string" indexed="false" stored="true"/>
  <field name="kvUuid" type="string" indexed="true" stored="true"/>
  <field name="kvVisitcount" type="int" indexed="true" stored="true"/>
  <field name="retweetedStatusUrl" type="string" indexed="true" stored="true"/>
  <field name="text" type="string" indexed="true" stored="true"/>
  <field name="wechatInfoType" type="int" indexed="true" stored="true"/>
  <dynamicField name="*_txt_en_split_tight" type="text_en_splitting_tight" indexed="true" stored="true"/>
  <dynamicField name="*_descendent_path" type="descendent_path" indexed="true" stored="true"/>
  <dynamicField name="*_ancestor_path" type="ancestor_path" indexed="true" stored="true"/>
  <dynamicField name="*_txt_en_split" type="text_en_splitting" indexed="true" stored="true"/>
  <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" useDocValuesAsStored="false"/>
  <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
  <dynamicField name="*_txt_rev" type="text_general_rev" indexed="true" stored="true"/>
  <dynamicField name="*_phon_en" type="phonetic_en" indexed="true" stored="true"/>
  <dynamicField name="*_s_lower" type="lowercase" indexed="true" stored="true"/>
  <dynamicField name="random_*" type="random"/>
  <dynamicField name="*_txt_en" type="text_en" indexed="true" stored="true"/>
  <dynamicField name="*_txt_zh" type="text_zh" indexed="true" stored="true"/>
  <dynamicField name="*_point" type="point" indexed="true" stored="true"/>
  <dynamicField name="*_srpt" type="location_rpt" indexed="true" stored="true"/>
  <dynamicField name="*_tdts" type="tdates" indexed="true" stored="true"/>
  <dynamicField name="attr_*" type="text_general" multiValued="true" indexed="true" stored="true"/>
  <dynamicField name="*_txt" type="text_general" indexed="true" stored="true"/>
  <dynamicField name="*_dts" type="date" multiValued="true" indexed="true" stored="true"/>
  <dynamicField name="*_tis" type="tints" indexed="true" stored="true"/>
  <dynamicField name="*_tls" type="tlongs" indexed="true" stored="true"/>
  <dynamicField name="*_tfs" type="tfloats" indexed="true" stored="true"/>
  <dynamicField name="*_tds" type="tdoubles" indexed="true" stored="true"/>
  <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
  <dynamicField name="*_is" type="ints" indexed="true" stored="true"/>
  <dynamicField name="*_ss" type="strings" indexed="true" stored="true"/>
  <dynamicField name="*_ls" type="longs" indexed="true" stored="true"/>
  <dynamicField name="*_bs" type="booleans" indexed="true" stored="true"/>
  <dynamicField name="*_fs" type="floats" indexed="true" stored="true"/>
  <dynamicField name="*_ds" type="doubles" indexed="true" stored="true"/>
  <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
  <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
  <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
  <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
  <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
  <dynamicField name="*_ws" type="text_ws" indexed="true" stored="true"/>
  <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
  <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
  <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
  <dynamicField name="*_t" type="text_general" indexed="true" stored="true"/>
  <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
  <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
  <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
  <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
  <dynamicField name="*_c" type="currency" indexed="true" stored="true"/>
  <copyField source="kvSite" dest="copy_site"/>
  <copyField source="kvSource" dest="copy_source"/>
  <copyField source="kvTitle" dest="copy_title"/>
</schema>

启动solrcloud
# # cd /data/solrcloud/solr/bin
./solr start -cloud -z 192.168.0.1:2181,192.168.0.2:2181 -p 8080

创建带有三分片和1个副本的topic和chenfeng集合:
./solr create_collection -c topic -shards 3 -replicationFactor 1 -p 8080
./solr create_collection -c chenfeng -shards 3 -replicationFactor 1 -p 8080

进入cloud-scripts目录并上传配置文件到zookeeper:
# cd /data/solrcloud/solr/server/scripts/cloud-scripts
# ./zkcli.sh   -zkhost   192.168.0.1:2281,192.168.0.2:2181  -cmd   upconfig  -confdir  /data/solrcloud/solr/server/solr/configsets/basic_configs/conf -confname  topic
# ./zkcli.sh   -zkhost   192.168.0.1:2281,192.168.0.2:2181  -cmd   upconfig  -confdir  /data/solrcloud/solr/server/solr/configsets/basic_configs/conf -confname  chenfeng

登陆zookeeper集群查看上传的文件:
# cd /data/solrcloud/zookeeper-3.4.10/bin
# ./zkCli.sh
Connecting to localhost:2181
2018-01-25 17:13:33,212 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT
2018-01-25 17:13:33,216 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=<NA>
2018-01-25 17:13:33,216 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_161
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9.x86_64/jre
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/data/solrcloud/zookeeper-3.4.10/bin/../build/classes:/data/solrcloud/zookeeper-3.4.10/bin/../build/lib/*.jar:/data/solrcloud/zookeeper-3.4.10/bin/../lib/slf4j-log4j12-1.6.1.jar:/data/solrcloud/zookeeper-3.4.10/bin/../lib/slf4j-api-1.6.1.jar:/data/solrcloud/zookeeper-3.4.10/bin/../lib/netty-3.10.5.Final.jar:/data/solrcloud/zookeeper-3.4.10/bin/../lib/log4j-1.2.16.jar:/data/solrcloud/zookeeper-3.4.10/bin/../lib/jline-0.9.94.jar:/data/solrcloud/zookeeper-3.4.10/bin/../zookeeper-3.4.10.jar:/data/solrcloud/zookeeper-3.4.10/bin/../src/java/lib/*.jar:/data/solrcloud/zookeeper-3.4.10/bin/../conf:
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2018-01-25 17:13:33,218 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=2.6.32-642.el6.x86_64
2018-01-25 17:13:33,219 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2018-01-25 17:13:33,219 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2018-01-25 17:13:33,219 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/data/solrcloud/zookeeper-3.4.10/bin
2018-01-25 17:13:33,220 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@277050dc
Welcome to ZooKeeper!
2018-01-25 17:13:33,240 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1032] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2018-01-25 17:13:33,297 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@876] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2018-01-25 17:13:33,305 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x1612c33f9f2000a, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /configs
[topic, chenfeng]
[zk: localhost:2181(CONNECTED) 1] ls /configs/topic
[currency.xml, protwords.txt, managed-schema, solrconfig.xml, synonyms.txt, elevate.xml, stopwords.txt, lang, params.json]
[zk: localhost:2181(CONNECTED) 2] ls /configs/chenfeng
[currency.xml, protwords.txt, managed-schema, solrconfig.xml, synonyms.txt, elevate.xml, stopwords.txt, lang, params.json]
[zk: localhost:2181(CONNECTED) 3] quit
Quitting...
2018-01-25 17:13:51,512 [myid:] - INFO  [main:ZooKeeper@684] - Session: 0x1612c33f9f2000a closed
2018-01-25 17:13:51,514 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@519] - EventThread shut down for session: 0x1612c33f9f2000a


查看solr集群页面:
http://192.168.0.1:8080/solr/#/~collections/chenfeng
http://192.168.0.1:8080/solr/#/~collections/topic

在界面上点reload重新加载配置文件,然后刷新页面。

以上是“内置jetty server下solrcloud6.2.1和Zookeeper集群如何安装和配置过程”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

推荐阅读:
  1. 数据库内置审计功能
  2. CDH5离线安装(最新版5.3.3内置hadoop2.5.0)

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

zookeeper jetty

上一篇:针对GraphQL安全测试的Burp扩展InQL是怎样的

下一篇:PHY寄存器怎么用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》