Abacn commented on code in PR #35479:
URL: https://github.com/apache/beam/pull/35479#discussion_r2208259076
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerAccessor.java:
##########
@@ -229,6 +229,10 @@ static SpannerOptions buildSpannerOptions(SpannerConfig
spannerConfig) {
builder.setCredentials(NoCredentials.getInstance());
}
String userAgentString = USER_AGENT_PREFIX + "/" +
ReleaseInfo.getReleaseInfo().getVersion();
+ SpannerIOMetadata spannerIOMetadata = SpannerIOMetadata.create();
+ if (spannerIOMetadata.getBeamJobId() != null) {
Review Comment:
there are mixed string == null and string.empty() checks. For robust
consider use Strings.isNullOrEmpty in all checks
LGTM after one comment
--
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]