Github user itaifrenkel commented on a diff in the pull request:

    https://github.com/apache/storm/pull/489#discussion_r27454715
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/ShellProcess.java ---
    @@ -121,34 +117,15 @@ public void writeTaskIds(List<Integer> taskIds) 
throws IOException {
         }
     
         public void logErrorStream() {
    -        try {
    -            while (processErrorStream.available() > 0) {
    -                int bufferSize = processErrorStream.available();
    -                byte[] errorReadingBuffer = new byte[bufferSize];
    -                processErrorStream.read(errorReadingBuffer, 0, bufferSize);
    -                ShellLogger.info(new String(errorReadingBuffer));
    -            }
    -        } catch (Exception e) {
    +        final Optional<String> errorsString = getErrorStreamMessage();
    +        if (errorsString.isPresent()) {
    +            ShellLogger.info(errorsString.get());
             }
         }
     
         public String getErrorsString() {
    --- End diff --
    
    add a comment saying this method must never block since it is run during 
critical shutdown phase


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to