Solr - 如何从我的 DataImportHandler 接收导入失败的通知? [英] Solr - How can I receive notifications of failed imports from my DataImportHandler?

查看:19
本文介绍了Solr - 如何从我的 DataImportHandler 接收导入失败的通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的 solr 索引根据计划刷新,并根据需要通过 DataImportHandler 完全导入任意刷新.我们遇到过几次由于各种原因导入失败的情况.

Our solr indexes are refreshed according to a schedule, as well as arbitrarily as needed by means of a DataImportHandler full import. We've had several occasions where the import fails for various reasons.

如何在使用 DataImportHandler 执行导入时收到错误通知(最好是电子邮件)?

How can I receive a notification (preferably email) that an error has occured while performing an import with a DataImportHandler?

推荐答案

在尝试使用 EventListener 并取得一些成功后,我们审查了我们的选项并最终确定了一种不太万无一失的方法.

After attempting to use an EventListener with some success we reviewed our options and ultimately settled on a less-than-foolproof approach.

我们没有扩展 Solr,而是使用我们现有的监控基础设施(主要是 Nagios)来轮询 dataimporthandler 的状态.它每分钟运行一次,并在检测到导入失败时通过我们的正常渠道提醒我们.这很好,但它仍然无法检测到作业是否根本没有运行 - 并且错过了其他一些极端情况.

Instead of extending Solr we're using our existing monitoring infrastructure (primarily with Nagios) to poll the status of the dataimporthandler. It runs every minute and alerts us via our normal channels if it detects a failed import. This is good, but it still fails to detect if jobs aren't running at all--and has missed a few other corner cases.

总的来说,虽然目前效果很好.它使用我们现有的基础设施,并将我们围绕 Solr 的努力限制在其核心功能上.当我们最终升级到 Solr 4.0 时,我肯定会重新审视这个问题.

Overall though this works well enough for now. It uses our existing infrastructure and keeps our efforts around Solr limited to its core functionality. I'll definately be revisiting this when we finally make the upgrade to Solr 4.0.

这篇关于Solr - 如何从我的 DataImportHandler 接收导入失败的通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆