Fixed unintentionally finished of the page output after the first file was processed. #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Overview
When the input is multiple files, the second and subsequent files are not output.
Cause of the Problem
Calling the
PageBuilder#finish
will invoke thePageOutput#finish
.https://github.com/embulk/embulk/blob/v0.11.4/embulk-core/src/main/java/org/embulk/spi/PageBuilderImpl.java#L255-L258
Once the
PageOutput#finish
is invoked, theoutputWorkers
will be done andPageOutput#add
will no longer work.https://github.com/embulk/embulk/blob/v0.11.4/embulk-core/src/main/java/org/embulk/exec/LocalExecutorPlugin.java#L456-L463
https://github.com/embulk/embulk/blob/v0.11.4/embulk-core/src/main/java/org/embulk/exec/LocalExecutorPlugin.java#L444-L454
Therefore, the second and subsequent files will not be output.