Abacn commented on code in PR #37982:
URL: https://github.com/apache/beam/pull/37982#discussion_r3029053080
##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnHarness.java:
##########
@@ -144,16 +144,23 @@ public static void main(String[] args) throws Exception {
@VisibleForTesting
public static void main(Function<String, String> environmentVarGetter)
throws Exception {
JvmInitializers.runOnStartup();
- System.out.format("SDK Fn Harness started%n");
- System.out.format("Harness ID %s%n",
environmentVarGetter.apply(HARNESS_ID));
- System.out.format(
- "Logging location %s%n",
environmentVarGetter.apply(LOGGING_API_SERVICE_DESCRIPTOR));
- System.out.format(
- "Control location %s%n",
environmentVarGetter.apply(CONTROL_API_SERVICE_DESCRIPTOR));
- System.out.format(
- "Status location %s%n",
environmentVarGetter.apply(STATUS_API_SERVICE_DESCRIPTOR));
+
+ Endpoints.ApiServiceDescriptor loggingApiServiceDescriptor =
+
getApiServiceDescriptor(environmentVarGetter.apply(LOGGING_API_SERVICE_DESCRIPTOR));
+ Endpoints.ApiServiceDescriptor controlApiServiceDescriptor =
+
getApiServiceDescriptor(environmentVarGetter.apply(CONTROL_API_SERVICE_DESCRIPTOR));
+ Endpoints.ApiServiceDescriptor statusApiServiceDescriptor =
+ environmentVarGetter.apply(STATUS_API_SERVICE_DESCRIPTOR) == null
+ ? null
+ :
getApiServiceDescriptor(environmentVarGetter.apply(STATUS_API_SERVICE_DESCRIPTOR));
String id = environmentVarGetter.apply(HARNESS_ID);
+ System.out.format("SDK Fn Harness started%n");
Review Comment:
I understand these `System.out` were due to that logging not initialized
yet. However I also remember raw stdout could be tagged as ERROR level logging
in Dataflow cloud logging (also possible in other runners). Consider removing
potential log spam
--
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]