[ 
https://issues.apache.org/jira/browse/BEAM-8015?focusedWorklogId=301897&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-301897
 ]

ASF GitHub Bot logged work on BEAM-8015:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Aug/19 11:32
            Start Date: 27/Aug/19 11:32
    Worklog Time Spent: 10m 
      Work Description: mxm commented on pull request #9389: [BEAM-8015] Get 
logs from Docker containers
URL: https://github.com/apache/beam/pull/9389#discussion_r318029479
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/environment/DockerCommand.java
 ##########
 @@ -147,17 +192,26 @@ private String runShortCommand(List<String> invocation)
               BufferedReader reader =
                   new BufferedReader(
                       new InputStreamReader(process.getInputStream(), 
StandardCharsets.UTF_8));
-              return reader.lines().collect(Collectors.joining());
-            });
-    // NOTE: We only consume the error string in the case of an error.
-    CompletableFuture<String> errorFuture =
-        CompletableFuture.supplyAsync(
-            () -> {
-              BufferedReader reader =
-                  new BufferedReader(
-                      new InputStreamReader(process.getErrorStream(), 
StandardCharsets.UTF_8));
-              return reader.lines().collect(Collectors.joining());
+              return reader.lines().collect(Collectors.joining(delimiter));
             });
+    CompletableFuture<String> errorFuture;
 
 Review comment:
   Wouldn't a better place for this and all following lines to be in the 
   
   ```java
   if (exitCode != 0) {
   ```
   
   block? The `errorFuture` and `errorString` are not used elsewhere.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 301897)
    Time Spent: 3h 10m  (was: 3h)

> Get logs for SDK worker Docker containers
> -----------------------------------------
>
>                 Key: BEAM-8015
>                 URL: https://issues.apache.org/jira/browse/BEAM-8015
>             Project: Beam
>          Issue Type: Improvement
>          Components: java-fn-execution
>            Reporter: Kyle Weaver
>            Assignee: Kyle Weaver
>            Priority: Major
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Currently, when SDK worker containers fail to start up properly, an exception 
> is thrown that provides no information about what happened. We can improve 
> debugging by keeping containers around long enough to log their logs before 
> removing them.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to