reuvenlax commented on a change in pull request #17130:
URL: https://github.com/apache/beam/pull/17130#discussion_r835956604



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1215,10 +1216,19 @@ public StreamAppendClient getStreamAppendClient(String 
streamName, Descriptor de
         throws Exception {
       ProtoSchema protoSchema =
           
ProtoSchema.newBuilder().setProtoDescriptor(descriptor.toProto()).build();
+      String dataflowJobId = GceMetadataUtil.fetchDataflowJobId();

Review comment:
       I wouldn't do this on every call to  get. Could  you instead embed an 
instance of  BigueryIOMetadata in DatasetServiceImpl, as is done in 
JobServiceImpl?
   
   TBH, I  don't love relying on GCE metadata  here. Dataflow may decide in the 
future to  run on clusters other than  GCE, at which point this code will 
break. However as long as we keep things isolated.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to