mutianf commented on code in PR #24015:
URL: https://github.com/apache/beam/pull/24015#discussion_r1123294538
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java:
##########
@@ -521,28 +562,47 @@ public Read withoutValidation() {
}
/**
- * Returns a new {@link BigtableIO.Read} that will read using the given
Cloud Bigtable service
- * implementation.
+ * Returns a new {@link BigtableIO.Read} that will use an official
Bigtable emulator.
*
* <p>This is used for testing.
- *
- * <p>Does not modify this object.
*/
@VisibleForTesting
- Read withBigtableService(BigtableService bigtableService) {
+ public Read withEmulator(String emulatorHost) {
BigtableConfig config = getBigtableConfig();
- return
toBuilder().setBigtableConfig(config.withBigtableService(bigtableService)).build();
+ return
toBuilder().setBigtableConfig(config.withEmulator(emulatorHost)).build();
}
/**
- * Returns a new {@link BigtableIO.Read} that will use an official
Bigtable emulator.
+ * Returns a new {@link BigtableIO.Read} with the attempt timeout. Attempt
timeout controls the
+ * timeout for each remote call.
*
- * <p>This is used for testing.
+ * <p>Does not modify this object.
*/
- @VisibleForTesting
- public Read withEmulator(String emulatorHost) {
- BigtableConfig config = getBigtableConfig();
- return
toBuilder().setBigtableConfig(config.withEmulator(emulatorHost)).build();
+ public Read withAttemptTimeout(Duration timeout) {
+ checkArgument(timeout.isLongerThan(Duration.ZERO), "attempt timeout must
be positive");
Review Comment:
I don't think they can? I think even before the migration there's always a
default value?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]