Skip to content

Commit

Permalink
[BEAM-1392] DoFn teardown not called on empty partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
aviemzur authored and Sela committed Feb 5, 2017
1 parent 6e220bb commit 25f9135
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ Iterable<OutputT> processPartition(

// skip if partition is empty.
if (!partition.hasNext()) {
DoFnInvokers.invokerFor(doFn).invokeTeardown();
return Lists.newArrayList();
}

// call startBundle() before beginning to process the partition.
doFnRunner.startBundle();
// process the partition; finishBundle() is called from within the output iterator.
Expand Down

0 comments on commit 25f9135

Please sign in to comment.