You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by sn...@apache.org on 2020/04/28 15:39:34 UTC
[nutch] branch master updated: NUTCH-2778 indexer-elastic to
properly log errors - add log output in BulkProcessor.Listener - do not
throw an exception in BulkProcessor.Listener (ignored anyway)
This is an automated email from the ASF dual-hosted git repository.
snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new 81a4b92 NUTCH-2778 indexer-elastic to properly log errors - add log output in BulkProcessor.Listener - do not throw an exception in BulkProcessor.Listener (ignored anyway)
new 73880df Merge pull request #509 from sebastian-nagel/NUTCH-2778-indexer-elastic-log-errors
81a4b92 is described below
commit 81a4b92ac7576f7777b96a9197ff86d64c46ccda
Author: Sebastian Nagel <sn...@apache.org>
AuthorDate: Wed Apr 15 22:18:53 2020 +0200
NUTCH-2778 indexer-elastic to properly log errors
- add log output in BulkProcessor.Listener
- do not throw an exception in BulkProcessor.Listener
(ignored anyway)
---
.../org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java b/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
index 74727a0..d2931ad 100644
--- a/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
+++ b/src/plugin/indexer-elastic/src/java/org/apache/nutch/indexwriter/elastic/ElasticIndexWriter.java
@@ -182,14 +182,15 @@ public class ElasticIndexWriter implements IndexWriter {
@Override
public void afterBulk(long executionId, BulkRequest request,
Throwable failure) {
- throw new RuntimeException(failure);
+ LOG.error("Elasticsearch indexing failed:", failure);
}
@Override
public void afterBulk(long executionId, BulkRequest request,
BulkResponse response) {
if (response.hasFailures()) {
- LOG.warn("Failures occurred during bulk request");
+ LOG.warn("Failures occurred during bulk request: {}",
+ response.buildFailureMessage());
}
}
};