Skip to content

Commit 2cf0930

Browse files
authored
Support specifying database in FirestoreV1ReadFn (resolves #36904) (#36905)
* test signing commit * Support setting project ID and database ID in FirestoreV1 Reads * WIP adding database ID to read fn * Revert "WIP adding database ID to read fn" This reverts commit 133d5a6. * Reapply "WIP adding database ID to read fn" This reverts commit f95d988. * Update read fn constructors to take project and database * fix build errors * Update integration test and BatchGet test * Update remaining unit tests * Fix write unit test * Minor format changes * update Changes.md * Update javadoc comment for getFirestoreStub * Run spotlessApply * fix changes.md * Fix changes.md conflict * Take 3 fix changes.md
1 parent 3ea5e1f commit 2cf0930

File tree

11 files changed

+489
-179
lines changed

11 files changed

+489
-179
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
## New Features / Improvements
7474

75-
* X feature added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
75+
* Support configuring Firestore database on ReadFn transforms (Java) ([#36904](https://github.com/apache/beam/issues/36904)).
7676

7777
## Breaking Changes
7878

sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreStatefulComponentFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ private FirestoreStatefulComponentFactory() {}
6363
* <p>The instance returned by this method is expected to bind to the lifecycle of a bundle.
6464
*
6565
* @param options The instance of options to read from
66+
* @param configuredProjectId The project to target, if null, falls back to value in options.
67+
* @param configuredDatabaseId The database to target, if null, falls back to value in options.
6668
* @return a new {@link FirestoreStub} pre-configured with values from the provided options
6769
*/
68-
FirestoreStub getFirestoreStub(PipelineOptions options) {
69-
return getFirestoreStub(options, null, null);
70-
}
71-
7270
FirestoreStub getFirestoreStub(
7371
PipelineOptions options,
7472
@Nullable String configuredProjectId,

0 commit comments

Comments
 (0)