Skip to content

Commit

Permalink
dont swallow errors (#32946)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedabu98 authored Oct 25, 2024
1 parent 3cc2909 commit 2dfa281
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,15 @@ public void finishBundle(FinishBundleContext c) throws Exception {
}

for (Map.Entry<DestinationT, BigQueryRowWriter<ElementT>> entry : writers.entrySet()) {
try {
DestinationT destination = entry.getKey();
BigQueryRowWriter<ElementT> writer = entry.getValue();
BigQueryRowWriter.Result result = writer.getResult();
BoundedWindow window = writerWindows.get(destination);
Preconditions.checkStateNotNull(window);
c.output(
new Result<>(result.resourceId.toString(), result.byteSize, destination),
window.maxTimestamp(),
window);
} catch (Exception e) {
exceptionList.add(e);
}
DestinationT destination = entry.getKey();
BigQueryRowWriter<ElementT> writer = entry.getValue();
BigQueryRowWriter.Result result = writer.getResult();
BoundedWindow window = writerWindows.get(destination);
Preconditions.checkStateNotNull(window);
c.output(
new Result<>(result.resourceId.toString(), result.byteSize, destination),
window.maxTimestamp(),
window);
}
writers.clear();
}
Expand Down

0 comments on commit 2dfa281

Please sign in to comment.