【发布时间】:2016-01-11 11:17:05
【问题描述】:
我正在尝试在独立实例(solr-5.3.0 和 Hadoop 2.7)中在 HDFS 上创建 solr 核心。我已经启动了如下服务,
$ bin/solr start -Dsolr.directoryFactory=HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.data.dir=hdfs://localhost:9000/tmp -Dsolr.updatelog=hdfs://localhost:9000/tmp -s solr-cores/core1
等待 30 秒才能看到 Solr 在端口 8983 上运行 [/] 在端口 8983 (pid=42277) 上启动 Solr 服务器。祝您搜索愉快!
并尝试创建如下所示的核心,
bin/solr create -c hdfsstarted -d /home/admin/HadoopTools/solr-5.3.0/server/solr/configsets/data_driven_schema_configs_hdfs/conf -n hdfsstarted
但出现以下错误:
设置新的核心实例目录: /home/admin/HadoopTools/solr-5.3.0/solr-cores/core1/hdfsstarted
使用命令创建新核心“hdfsstarted”: http://localhost:8983/solr/admin/cores?action=CREATE&name=hdfsstarted&instanceDir=hdfsstarted
ERROR: Error CREATEing SolrCore 'hdfsstarted': Unable to create core [hdfsstarted] Caused by: Protocol message end-group tag does not match expected tag.
我已经像下面这样修改了 solrconfig.xml,
<directoryFactory name="DirectoryFactory" class="solr.HdfsDirectoryFactory">
<str name="solr.hdfs.home">hdfs://10.67.5.244:50070/tmp</str>
<bool name="solr.hdfs.blockcache.enabled">true</bool>
<int name="solr.hdfs.blockcache.slab.count">1</int>
<bool name="solr.hdfs.blockcache.direct.memory.allocation">false</bool>
<int name="solr.hdfs.blockcache.blocksperbank">16384</int>
<bool name="solr.hdfs.blockcache.read.enabled">true</bool>
<bool name="solr.hdfs.blockcache.write.enabled">false</bool>
<bool name="solr.hdfs.nrtcachingdirectory.enable">true</bool>
<int name="solr.hdfs.nrtcachingdirectory.maxmergesizemb">16</int>
<int name="solr.hdfs.nrtcachingdirectory.maxcachedmb">192</int>
</directoryFactory>
<lockType>
hdfs
</lockType>
请告诉我如何在 HDFS 中正确创建核心。
【问题讨论】:
-
你能解决这个问题吗?在使用 solr 5.2.1 和 hdp 2.4 的 Solr->HDFS 配置中看到相同的错误。