The ForeachWriter to process all data.
Adds a batch of data to this sink.
Adds a batch of data to this sink. The data for a given batchId
is deterministic and if
this method is called more than once with the same batchId (which will happen in the case of
failures), then data
should only be added once.
Note 1: You cannot apply any operators on data
except consuming it (e.g., collect/foreach
).
Otherwise, you may get a wrong result.
Note 2: The method is supposed to be executed synchronously, i.e. the method should only return after data is consumed by sink successfully.
A Sink that forwards all data into ForeachWriter according to the contract defined by ForeachWriter.
The expected type of the sink.