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

Fix to accept the arrow keys in BeeLine CLI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • Beeline
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: