[
https://issues.apache.org/jira/browse/BEAM-8376?focusedWorklogId=575165&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-575165
]
ASF GitHub Bot logged work on BEAM-8376:
----------------------------------------
Author: ASF GitHub Bot
Created on: 31/Mar/21 21:45
Start Date: 31/Mar/21 21:45
Worklog Time Spent: 10m
Work Description: BenWhitehead commented on a change in pull request
#14261:
URL: https://github.com/apache/beam/pull/14261#discussion_r605240897
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreDoFn.java
##########
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.gcp.firestore;
+
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.display.DisplayData;
+import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
+
+/**
+ * Base class for all {@link DoFn} defined in the Firestore Connector.
Review comment:
It is true for all of the `DoFn` which are stateful and have a lifecycle
that must be managed. For the `DoFn` which perform RPCs, Setup is for the
RpcQos management which we want to live longer than an individual bundle, and
StartBundle is where we create the RPC clients based on the `PipelineOptions`
from `StartBundleContext#getPipelineOptions()`.
This base class also serves as an upper bound for the unit tests where all
DoFn are checked to ensure they are serializable as well as performing some
common mocking which is used across the majority of tests (e.g.
`StartBundleContext`, `ProcessContext`, `Credentials` etc).
There are a few `DoFn` which will be added in the "Read" PR to follow which
directly extend DoFn and only implement a `@ProcessElement` method as they are
otherwise stateless.
I'll update the comment on this class to call out that it is specifically
for Stateful `DoFn`.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 575165)
Time Spent: 12h 10m (was: 12h)
> Add FirestoreIO connector to Java SDK
> -------------------------------------
>
> Key: BEAM-8376
> URL: https://issues.apache.org/jira/browse/BEAM-8376
> Project: Beam
> Issue Type: New Feature
> Components: io-java-gcp
> Reporter: Stefan Djelekar
> Priority: P3
> Time Spent: 12h 10m
> Remaining Estimate: 0h
>
> Motivation:
> There is no Firestore connector for Java SDK at the moment.
> Having it will enhance the integrations with database options on the Google
> Cloud Platform.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)