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

Fix to accept the arrow keys in BeeLine CLI

    Details

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

      CentOS 6.7

      Description

      BeeLine in the master doesn't accept the arrow keys as follows (e.g. ^[[A is up arrow key).

      [root@hadoop ~]# beeline
      which: no hbase in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/hadoop/bin:/usr/local/hive/bin:/usr/pgsql-9.4/bin:/root/bin)
      Beeline version 2.1.0-SNAPSHOT by Apache Hive
      beeline> ^[[A^[[B^[[C^[[D
      

      Because UnsupportedTerminal is set in the same way as background. we can check with the ps command.

      [root@hadoop ~]# ps -ef | grep beeline
      root       5799   1433  1 12:05 pts/0    00:00:02 /usr/lib/jvm/java/bin/java -Xmx256m (snip) -Djline.terminal=jline.UnsupportedTerminal (snip) org.apache.hive.beeline.BeeLine
      

      I think the HIVE-6758 affected this behavior. I will fix to accept the arrow keys.

        Attachments

        1. HIVE-12834.1.patch
          0.4 kB
          Shinichi Yamashita

          Issue Links

            Activity

              People

              • Assignee:
                sinchii Shinichi Yamashita
                Reporter:
                sinchii Shinichi Yamashita
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: