echauchot commented on a change in pull request #15955:
URL: https://github.com/apache/beam/pull/15955#discussion_r759155396
##########
File path:
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
##########
@@ -1067,8 +1063,11 @@ private void checkForFailures(String message) throws
IOException {
@Teardown
public void teardown() throws Exception {
- if (producer != null && producer.getOutstandingRecordsCount() > 0) {
- producer.flushSync();
+ if (producer != null) {
+ if (producer.getOutstandingRecordsCount() > 0) {
+ producer.flushSync();
+ }
+ producer.destroy();
}
producer = null;
Review comment:
I checked the runner code. What happens is that the `Write` returns a
`PDone` (empty `PCollection`). the Write is executed with a native `map` and
the output of the map is the last native `Dataset` of the native (generated)
pipeline on which we call a passthrough native `writer` but the actual write
operation has already been done in reality (when we executed the map).
Conclusion the engine will set the parallelism on the writer that does nothing.
So I was wrong, the parallelism of the writing operation will be the one set by
the engine for the final map of the DAG.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]