在 HDFS-Solr 中存储索引文件

Storing Index file in HDFS- Solr

我正在配置 Solr 以将索引数据文件存储在 HDFS 中。

bin/solr start -e cloud -c -Dsolr.directoryFactory=HdfsDirectoryFactory -Dsolr.lock.type=hdfs -Dsolr.hdfs.home=hdfs://localhost:50070/solr

当我尝试打开 solr 的 url 时出现错误 "SolrCore Initialization Failures",创建目录时出现问题。

如果您运行作为'solr'用户执行此命令,请确保'solr'对HDFS具有写入'/user/solr'方向的权限。如果没有,您可以使用 hadoop fs -chown solr /user/solr 更改该目录的所有者并确保它具有写入权限(尝试此命令:hadoop fs -chmod 755 /user/solr)。

使用的端口似乎有误 hdfs://localhost:50070/solr

尝试hdfs://localhost:8020/solr你可以在你的core-site.xml.

中看到hdfs端口