Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/flink/pull/2790#discussion_r89341178
--- Diff:
flink-streaming-connectors/flink-connector-elasticsearch2/src/main/java/org/apache/flink/streaming/connectors/elasticsearch2/ElasticsearchSink.java
---
@@ -244,12 +260,7 @@ public void close() {
}
if (hasFailure.get()) {
- Throwable cause = failureThrowable.get();
- if (cause != null) {
- throw new RuntimeException("An error occured in
ElasticsearchSink.", cause);
- } else {
- throw new RuntimeException("An error occured in
ElasticsearchSink.");
- }
+ LOG.error("Some documents failed while indexing to
Elasticsearch: " + failureThrowable.get());
--- End diff --
I would suggest to add a debug log statement as well logging the full stack
trace.
Also, in the other connectors we have a flag that allows the user to
control whether an error should be logged or fail the connector. I would
suggest to add this here as well.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---