File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2196,9 +2196,10 @@ public PCollection<V> expand(PCollection<T> input) {
2196
2196
autoSharding == null || (autoSharding && input .isBounded () != IsBounded .UNBOUNDED ),
2197
2197
"Autosharding is only supported for streaming pipelines." );
2198
2198
2199
- long batchSize = getBatchSize () == null ? DEFAULT_BATCH_SIZE : getBatchSize ();
2200
- long maxBufferingDuration =
2201
- getMaxBatchBufferingDuration () == null
2199
+ Long batchSizeAsLong = getBatchSize ();
2200
+ long batchSize = batchSizeAsLong == null ? DEFAULT_BATCH_SIZE : batchSizeAsLong ;
2201
+ Long maxBufferingDurationAsLong = getMaxBatchBufferingDuration ();
2202
+ long maxBufferingDuration = maxBufferingDurationAsLong == null
2202
2203
? DEFAULT_MAX_BATCH_BUFFERING_DURATION
2203
2204
: getMaxBatchBufferingDuration ();
2204
2205
@@ -2215,7 +2216,7 @@ public PCollection<V> expand(PCollection<T> input) {
2215
2216
.setStatement (getStatement ())
2216
2217
.setRetryConfiguration (getRetryConfiguration ())
2217
2218
.setReturnResults (true )
2218
- .setBatchSize (1L ) // We are writing iterables 1 at a time.
2219
+ .setBatchSize (1L ) // We are writing iterables 1 at a time.
2219
2220
.setMaxBatchBufferingDuration (maxBufferingDuration )
2220
2221
.build ())));
2221
2222
}
You can’t perform that action at this time.
0 commit comments