kw2542 commented on a change in pull request #14945:
URL: https://github.com/apache/beam/pull/14945#discussion_r685575151



##########
File path: 
runners/samza/src/main/java/org/apache/beam/runners/samza/SamzaRunner.java
##########
@@ -81,12 +82,16 @@ private SamzaRunner(SamzaPipelineOptions options) {
   }
 
   public PortablePipelineResult runPortablePipeline(RunnerApi.Pipeline 
pipeline, JobInfo jobInfo) {
-    final String dotGraph = PipelineDotRenderer.toDotString(pipeline);
-    LOG.info("Portable pipeline to run:\n{}", dotGraph);
+    Optional<String> jsonGraphOpt = 
PipelineJsonRenderer.toJsonString(pipeline);
+    String jsonGraph = "";
+    if (jsonGraphOpt.isPresent()) {
+      jsonGraph = jsonGraphOpt.get();
+    }

Review comment:
       I have to admit that changing `PipelineJsonRenderer.toJsonString` to 
return Optional actually made it less readable, let's revert it back to 
original. 




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