Hi,
In a Spark Streaming Job, I am using JavaEsSpark.saveToEs to bulk documents into ES indices.
So far so good, but I was wondering about its behaviour.
Indeed, I noticed that the code after the JavaEsSpark call seems to be executed whereas it is not over...
if (...) {
JavaEsSpark.saveToEs(message, index_pattern+"_{target_index}/{target_type}");
}
// at last, we commit the offset ranges
((CanCommitOffsets) messages.inputDStream()).commitAsync(offsetRanges);
As you can see, I commit kafka offset after saveToEs, but sometimes, saveToEs failed (what so ever issue) and offsets are still commited !
So, if anyone knows sharply the behaviour of this API, I would be pleased
Thanks a lot.