每个Solr Core都有自己的类负载器吗?

发布于 2025-01-27 18:40:11 字数 261 浏览 3 评论 0原文

为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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

任性一次 2025-02-03 18:40:11

我当时通过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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文