每个Solr Core都有自己的类负载器吗?
为Solr创建插件时,您可以在solrconfig.xml文件中添加一些插件库jar文件:
< lib dir =“/path/to/jar/files” regex =“。*\。jar”/>
在我的情况下,我使用一些系统库(.dll
,.so
),
并且我需要确保它们不会尝试加载它们超过它们的加载。一次。
每个Solr Core都有自己的类负载器吗?
When creating plugins for Solr, you add some plugin library jar files into the solrconfig.xml file:
<lib dir="/path/to/jar/files" regex=".*\.jar" />
In my case, I use a few system libraries (.dll
, .so
)
And I need to make sure they do not try to load them more than once.
Does each Solr core have its own classloader?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我当时通过Slack与一些Solr犯罪者交谈,他们说答案是肯定的。每个核心都有自己的类负载器。参见 https://issues.apache.org/jira/jira/solr-browse/solr-16131 以阅读与此相关的一些问题,该问题确认每个核心都有自己的类负载器。
更新:Solr 9.x从注释中
我必须将自定义插件(现在是9.x中的模块)添加到
solr.modules
变量,否则它仍然会实例化多个单元。I was talking with some Solr committers via slack and they said the answer is Yes. Each core has its own classloader. See https://issues.apache.org/jira/browse/SOLR-16131 for a read on some issues related to this, which confirms that each core has its own classloader.
Update: Solr 9.x from comments
I had to add my custom plugin (now module in 9.x) to the
solr.modules
variable, otherwise it still instantiates multiple singletons.