pcostell commented on code in PR #27256:
URL: https://github.com/apache/beam/pull/27256#discussion_r1268730895
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreStatefulComponentFactory.java:
##########
@@ -86,7 +90,11 @@ FirestoreStub getFirestoreStub(PipelineOptions options) {
FirestoreOptions firestoreOptions = options.as(FirestoreOptions.class);
String emulatorHostPort = firestoreOptions.getEmulatorHost();
+ if (emulatorHostPort == null) {
+ emulatorHostPort = System.getenv(FIRESTORE_EMULATOR_HOST_ENV_VARIABLE);
+ }
if (emulatorHostPort != null) {
+ firestoreOptions.setEmulatorHost(emulatorHostPort);
Review Comment:
Injecting the value back into the value given to us does not make sense --
we should be treating the options argument as immutable.
--
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]