[ 
https://issues.apache.org/jira/browse/BEAM-6841?focusedWorklogId=219831&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-219831
 ]

ASF GitHub Bot logged work on BEAM-6841:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Mar/19 05:58
            Start Date: 28/Mar/19 05:58
    Worklog Time Spent: 10m 
      Work Description: kmjung commented on pull request #8061: [BEAM-6841] Add 
support for reading query results using the BigQuery storage API.
URL: https://github.com/apache/beam/pull/8061#discussion_r269865738
 
 

 ##########
 File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryQuerySource.java
 ##########
 @@ -96,62 +90,35 @@ private BigQueryQuerySource(
     this.query = checkNotNull(query, "query");
     this.flattenResults = checkNotNull(flattenResults, "flattenResults");
     this.useLegacySql = checkNotNull(useLegacySql, "useLegacySql");
-    this.dryRunJobStats = new AtomicReference<>();
     this.priority = priority;
     this.location = location;
     this.kmsKey = kmsKey;
+    queryHelperReference = new AtomicReference<>();
+  }
+
+  /**
+   * Since the query helper reference is declared as transient, neither the 
AtomicReference nor the
+   * structure it refers to are persisted across serialization boundaries. The 
code below is
+   * resilient to the QueryHelper object disappearing in between method calls, 
but the reference
 
 Review comment:
   There's some transient state associated with the helper -- specifically, in 
order to avoid unnecessarily doing multiple dry runs of the query, we keep 
around the resulting job statistics object using the same pattern 
(https://github.com/apache/beam/blob/master/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryQuerySource.java#L79).
 I can make the change you're recommending, though.
 
----------------------------------------------------------------
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: 219831)
    Time Spent: 4h  (was: 3h 50m)

> Support reading query results with the BigQuery storage API
> -----------------------------------------------------------
>
>                 Key: BEAM-6841
>                 URL: https://issues.apache.org/jira/browse/BEAM-6841
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-java-gcp
>            Reporter: Kenneth Jung
>            Assignee: Kenneth Jung
>            Priority: Minor
>          Time Spent: 4h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to