scwhittle commented on code in PR #37982:
URL: https://github.com/apache/beam/pull/37982#discussion_r3044891999
##########
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:
Dataflow logs stdout as default/info log level in cloud logging.
Since this is just keeping the existing behavior I am going to leave it. The
stdout logs can be useful for debugging if the runner has issues with the
logging stream as it can verify the worker sdk was started successfully.
--
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]