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

Password prompt in Beeline is continuously printed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 2.0.1
    • None
    • Beeline
    • None

    Description

      I'm experiencing this issue with a Mac, which was not occurring until recently.

      Beeline version 2.2.0-SNAPSHOT by Apache Hive
      beeline> !connect jdbc:hive2://localhost:10000
      Connecting to jdbc:hive2://localhost:10000
      Enter username for jdbc:hive2://localhost:10000: hive
      Enter password for jdbc:hive2://localhost:10000:
      Enter password for jdbc:hive2://localhost:10000:
      Enter password for jdbc:hive2://localhost:10000:
      ...
      

      The 'Enter password for jdbc:hive2://localhost:10000:' line continues to print until enter is hit. From looking at the code in Commands.java (lines 1413-1420), it's not quite clear why this happens on the second call to readLine()) :

      if (username == null) {
        username = beeLine.getConsoleReader().readLine("Enter username for " + url + ": ");
      }
      props.setProperty("user", username);
      if (password == null) {
        password = beeLine.getConsoleReader().readLine("Enter password for " + url + ": ",
            new Character('*'));
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ayousufi Abdullah Yousufi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: