Skip to content

Commit

Permalink
Never ask for a bundle size of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
joar committed Oct 3, 2023
1 parent 33d52a8 commit f06b1f8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public Collection<CommittedBundle<BoundedSourceShard<T>>> getInitialInputs(
throws Exception {
BoundedSource<T> source = ReadTranslation.boundedSourceFromTransform(transform);
long estimatedBytes = source.getEstimatedSizeBytes(options);
long bytesPerBundle = estimatedBytes / targetParallelism;
long bytesPerBundle = Math.max(1L, estimatedBytes / targetParallelism);
List<? extends BoundedSource<T>> bundles = source.split(bytesPerBundle, options);
ImmutableList.Builder<CommittedBundle<BoundedSourceShard<T>>> shards =
ImmutableList.builder();
Expand Down

0 comments on commit f06b1f8

Please sign in to comment.