Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-19231

Beeline generates garbled output when using UnsupportedTerminal

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 3.1.0, 3.0.0
    • Component/s: Beeline
    • Labels:
      None
    • Target Version/s:

      Description

      We had a customer that was using some sort of front end that would invoke beeline commands with some query files on a node that that remote to the HS2 node.

      So beeline runs locally on this edge but connects to a remote HS2. Since the fix made in HIVE-14342, the beeline started producing garbled line in the output. Something like

      ^Mnull                                                   ^Mnull^Mnull                                                   ^Mnull00-0000	All Occupations	135185230	42270
      11-0000	Management occupations	6152650	100310

       

      I havent been able to reproduce the issue locally as I do not have their system, but with some additional instrumentation I have been able to get some info regarding the beeline process.

      Essentially, such invocation causes beeline process to run with -Djline.terminal=jline.UnsupportedTerminal all the time and thus causes the issue. They can run the same beeline command directly in the shell on the same host and it does not cause this issue.

      PID            S   TTY          TIME COMMAND
      44107  S    S  ?        00:00:00 bash beeline -u ...

      PID              S     TTY          TIME COMMAND
      48453  S+   S     pts/4    00:00:00 bash beeline -u ...

      Somehow that process wasnt attached to any local terminals. So the check made for /dev/stdin wouldnt work.

       

      Instead an additional check to check the TTY session of the process before using the UnsupportedTerminal (which really should only be used for backgrounded beeline sessions) seems to resolve the issue.

        Attachments

        1. HIVE-19231.patch
          0.5 kB
          Naveen Gangam

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              ngangam Naveen Gangam Assign to me
              Reporter:
              ngangam Naveen Gangam

              Dates

              • Created:
                Updated:
                Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

                Issue deployment