You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Miklos Csanady (JIRA)" <ji...@apache.org> on 2016/09/20 13:35:20 UTC

[jira] [Commented] (HIVE-14049) Password prompt in Beeline is continuously printed

    [ https://issues.apache.org/jira/browse/HIVE-14049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506549#comment-15506549 ] 

Miklos Csanady commented on HIVE-14049:
---------------------------------------

Can you give some details to reproduce the error?

On my mac it works as expected:

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

The second readLine call is responsible for the password input. It replaces the output to the console to * as you see.


> Password prompt in Beeline is continuously printed
> --------------------------------------------------
>
>                 Key: HIVE-14049
>                 URL: https://issues.apache.org/jira/browse/HIVE-14049
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>    Affects Versions: 2.0.1
>            Reporter: Abdullah Yousufi
>
> I'm experiencing this issue with a Mac, which was not occurring until recently.
> {code}
> 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:
> ...
> {code}
> 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()) :
> {code}
> 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('*'));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)