reuvenlax commented on code in PR #17550:
URL: https://github.com/apache/beam/pull/17550#discussion_r876993296
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java:
##########
@@ -263,11 +281,12 @@ void invalidateWriteStream() {
// thread has already invalidated
// and recreated the stream).
@Nullable
- StreamAppendClient cachedAppendClient =
APPEND_CLIENTS.getIfPresent(streamName);
+ StreamAppendClient cachedAppendClient =
+
APPEND_CLIENTS.getIfPresent(getStreamAppendClientCacheEntryName());
Review Comment:
nit - store cachedEntryName in a local variable instead of recomputing twice
here
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java:
##########
@@ -213,6 +226,14 @@ String createStreamIfNeeded() {
return this.streamName;
}
+ StreamAppendClient generateClient() {
Review Comment:
Minor nit - remove try/catch since the calling function already catches the
exception
--
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]