Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-9076

ContainerShellWebSocket Render Process Output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 3.3.0
    • None
    • webapp
    • None
    • Patch

    Description

      ContainerShellWebSocket.java
              // Render process output
              int no = pair.in.available();
              pair.in.read(buffer, 0, Math.min(no, buffer.length));
              String formatted = new String(buffer, Charset.forName("UTF-8"))
                  .replaceAll("\n", "\r\n");
              session.getRemote().sendString(formatted);
            }
      

      This code strikes me as a bit odd. First of it, it is using available which is known as a being unreliable and inaccurate (i.e., for sockets) . Second, it will only read a max of 4000 characters and that's it. Anything else is truncated.

      Change this code to read the entire data stream.

      Attachments

        1. YARN-9076.1.patch
          2 kB
          David Mollitor
        2. YARN-9076.2.patch
          3 kB
          David Mollitor
        3. YARN-9076.3.patch
          3 kB
          David Mollitor

        Activity

          People

            belugabehr David Mollitor
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: