|
19 | 19 |
|
20 | 20 | import static java.util.stream.Collectors.toList; |
21 | 21 | import static org.apache.beam.sdk.io.gcp.spanner.MutationUtils.isPointDelete; |
| 22 | +import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_CDC_TIME_INCREMENT; |
22 | 23 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_CHANGE_STREAM_NAME; |
| 24 | +import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_HEARTBEAT_MILLIS; |
23 | 25 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_INCLUSIVE_END_AT; |
24 | 26 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_INCLUSIVE_START_AT; |
| 27 | +import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_LOW_LATENCY_CDC_TIME_INCREMENT; |
| 28 | +import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_LOW_LATENCY_HEARTBEAT_MILLIS; |
25 | 29 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_RPC_PRIORITY; |
26 | 30 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.DEFAULT_WATERMARK_REFRESH_RATE; |
27 | 31 | import static org.apache.beam.sdk.io.gcp.spanner.changestreams.ChangeStreamsConstants.MAX_INCLUSIVE_END_AT; |
@@ -537,8 +541,8 @@ public static ReadChangeStream readChangeStream() { |
537 | 541 | .setRpcPriority(DEFAULT_RPC_PRIORITY) |
538 | 542 | .setInclusiveStartAt(DEFAULT_INCLUSIVE_START_AT) |
539 | 543 | .setInclusiveEndAt(DEFAULT_INCLUSIVE_END_AT) |
540 | | - .setCdcTimeIncrement(Duration.standardMinutes(2)) |
541 | | - .setHeartbeatMillis(2000) |
| 544 | + .setCdcTimeIncrement(DEFAULT_CDC_TIME_INCREMENT) |
| 545 | + .setHeartbeatMillis(DEFAULT_HEARTBEAT_MILLIS) |
542 | 546 | .build(); |
543 | 547 | } |
544 | 548 |
|
@@ -1931,8 +1935,8 @@ public ReadChangeStream withUsingPlainTextChannel(boolean plainText) { |
1931 | 1935 |
|
1932 | 1936 | public ReadChangeStream withLowLatency() { |
1933 | 1937 | return toBuilder() |
1934 | | - .setCdcTimeIncrement(Duration.standardSeconds(1)) |
1935 | | - .setHeartbeatMillis(100) |
| 1938 | + .setCdcTimeIncrement(DEFAULT_LOW_LATENCY_CDC_TIME_INCREMENT) |
| 1939 | + .setHeartbeatMillis(DEFAULT_LOW_LATENCY_HEARTBEAT_MILLIS) |
1936 | 1940 | .build(); |
1937 | 1941 | } |
1938 | 1942 |
|
|
0 commit comments