| commit | 947cbb79fe4dfe4e2bc384da488043b509ffbe71 | [log] [tgz] |
|---|---|---|
| author | BenWhitehead <BenWhitehead@users.noreply.github.com> | Wed Jul 14 00:10:10 2021 -0400 |
| committer | GitHub <noreply@github.com> | Tue Jul 13 21:10:10 2021 -0700 |
| tree | 54d1d5baf2005752098aa86356e9a21f2b0ecb87 | |
| parent | e542d1fd7deb20faf2232a33426b18df1f554890 [diff] |
[BEAM-8376] Google Cloud Firestore Connector - Add Firestore v1 Read Operations (#15005) * [BEAM-8376] Google Cloud Firestore Connector - Add Firestore v1 Read Operations Entry point for accessing Firestore V1 read methods is `FirestoreIO.v1().read()`. Currently supported read RPC methods: * `PartitionQuery` * `RunQuery` * `ListCollectionIds` * `ListDocuments` * `BatchGetDocuments` ### Unit Tests No external dependencies are needed for this suite A large suite of unit tests have been added to cover most branches and error scenarios in the various components. Test for input validation and bounds checking are also included in this suite. ### Integration Tests Integration tests for each type of RPC is present in `org.apache.beam.sdk.io.gcp.firestore.it.FirestoreV1IT`. All of these tests leverage `TestPipeline` and verify the expected Documents/Collections are all operated on during the test. * fix failing nullability check for cursor comparator * fix @Nullable imports * fix typo * throw exception upon failing to determine restart point for batch get * add unit test for org.apache.beam.sdk.io.gcp.firestore.FirestoreV1.PartitionQuery.PartitionQueryResponseToRunQueryRequest.processElement * javadoc typo fixes from review * Explicitly set Client built in retry to max 1 attempt since we're taking care of all retry logic at a higher level * Clean up names of DoFn base classes to make them more accurate * rename FirestoreV1Fn -> FirestoreV1RpcAttemptContexts * restructure javadocs a big to keep context close to code samples * decouple partition query from run query it can be advantageous to allow a customer to perform some post processing of a query before executing it. By decoupling PartitionQuery from directly outputting to RunQuery this is easily possible. * Add todo to jira issues for query integration improvements * spotless * fix incorrect nullable annotation
Apache Beam is a unified model for defining both batch and streaming data-parallel processing pipelines, as well as a set of language-specific SDKs for constructing pipelines and Runners for executing them on distributed processing backends, including Apache Flink, Apache Spark, Google Cloud Dataflow, and Hazelcast Jet.
| Lang | SDK | Dataflow | Flink | Samza | Spark | Twister2 |
|---|---|---|---|---|---|---|
| Go | --- | --- | ||||
| Java | ||||||
| Python | --- | --- | ||||
| XLang | --- |
Beam provides a general approach to expressing embarrassingly parallel data processing pipelines and supports three categories of users, each of which have relatively disparate backgrounds and needs.
The model behind Beam evolved from a number of internal Google data processing projects, including MapReduce, FlumeJava, and Millwheel. This model was originally known as the “Dataflow Model”.
To learn more about the Beam Model (though still under the original name of Dataflow), see the World Beyond Batch: Streaming 101 and Streaming 102 posts on O’Reilly’s Radar site, and the VLDB 2015 paper.
The key concepts in the Beam programming model are:
PCollection: represents a collection of data, which could be bounded or unbounded in size.PTransform: represents a computation that transforms input PCollections into output PCollections.Pipeline: manages a directed acyclic graph of PTransforms and PCollections that is ready for execution.PipelineRunner: specifies where and how the pipeline should execute.Beam supports multiple language specific SDKs for writing pipelines against the Beam Model.
Currently, this repository contains SDKs for Java, Python and Go.
Have ideas for new SDKs or DSLs? See the JIRA.
Beam supports executing programs on multiple distributed processing backends through PipelineRunners. Currently, the following PipelineRunners are available:
DirectRunner runs the pipeline on your local machine.DataflowRunner submits the pipeline to the Google Cloud Dataflow.FlinkRunner runs the pipeline on an Apache Flink cluster. The code has been donated from dataArtisans/flink-dataflow and is now part of Beam.SparkRunner runs the pipeline on an Apache Spark cluster. The code has been donated from cloudera/spark-dataflow and is now part of Beam.JetRunner runs the pipeline on a Hazelcast Jet cluster. The code has been donated from hazelcast/hazelcast-jet and is now part of Beam.Twister2Runner runs the pipeline on a Twister2 cluster. The code has been donated from DSC-SPIDAL/twister2 and is now part of Beam.Have ideas for new Runners? See the JIRA.
To learn how to write Beam pipelines, read the Quickstart for [Java, Python, or Go] available on our website.
To get involved in Apache Beam:
Instructions for building and testing Beam itself are in the contribution guide.