[
https://issues.apache.org/jira/browse/BEAM-4061?focusedWorklogId=97211&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-97211
]
ASF GitHub Bot logged work on BEAM-4061:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/May/18 19:54
Start Date: 01/May/18 19:54
Worklog Time Spent: 10m
Work Description: jkff commented on a change in pull request #4264:
[BEAM-4061] Introduced SpannerWriteResult
URL: https://github.com/apache/beam/pull/4264#discussion_r185316268
##########
File path:
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerWriteIT.java
##########
@@ -128,19 +140,72 @@ public void testWrite() throws Exception {
.withInstanceId(options.getInstanceId())
.withDatabaseId(databaseName));
- p.run();
- DatabaseClient databaseClient =
- spanner.getDatabaseClient(
- DatabaseId.of(
- project, options.getInstanceId(), databaseName));
+ PipelineResult result = p.run();
+ result.waitUntilFinish();
+ assertThat(result.getState(), is(PipelineResult.State.DONE));
+ assertThat(countNumberOfRecords(), equalTo((long) numRecords));
Review comment:
In general, "write-then-read" tests are preferred in Beam, where both write
and read are done using your transform. They can be done in separate pipelines
in one test method, or in one pipeline. I'm OK keeping this as-is for this PR
though.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 97211)
Time Spent: 2h (was: 1h 50m)
> Chaining SpannerIO#write() transforms
> -------------------------------------
>
> Key: BEAM-4061
> URL: https://issues.apache.org/jira/browse/BEAM-4061
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Mairbek Khadikov
> Assignee: Mairbek Khadikov
> Priority: Major
> Fix For: 2.5.0
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> It should be possible to chain several Cloud Spanner writes. In practice, we
> can leverage Wait.on transform by returning a result object from
> SpannerIO#write.
> One particular example, when this feature is useful is full database import.
> When data in parent tables should be injected before interleaved tables. See
> more about table hierarchies in Spanner here
> https://cloud.google.com/spanner/docs/schema-and-data-model#creating_a_hierarchy_of_interleaved_tables
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)