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

Vihang Karajgaonkar commented on HIVE-14541:
--------------------------------------------

I think this JIRA can be closed. Earlier I thought that when you use beeline -u 
<url> to connect using Beeline, it should prompt for a username/password and 
not assume that username and password is empty string. But it seems like this 
is by design and should not be changed. Otherwise it might break backwards 
compatibility. Existing scripts which rely on this behavior might break. 
HIVE-13589 is a different use-case where if the user likes he/she can provide 
the password on the console using the password prompt (without showing it on 
the screen) for security reasons when using beeline -u <url> -n <user> -p 
syntax.

> Beeline does not prompt for username and password properly
> ----------------------------------------------------------
>
>                 Key: HIVE-14541
>                 URL: https://issues.apache.org/jira/browse/HIVE-14541
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>            Reporter: Vihang Karajgaonkar
>            Assignee: Miklos Csanady
>
> In the default mode, when we connect using !connect 
> jdbc:hive2://localhost:10000 (without providing user and password) beeling 
> prompts for it as expected.
> But when we use beeline -u "url" and do not provide -n or -p arguments, it 
> does not prompt for the user/password
> {noformat}
> $ ./beeline -u jdbc:hive2://localhost:10000
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:/Users/vihang/work/src/upstream/hive/packaging/target/apache-hive-2.2.0-SNAPSHOT-bin/apache-hive-2.2.0-SNAPSHOT-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:/usr/local/Cellar/hadoop/2.7.2/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
> Connecting to jdbc:hive2://localhost:10000
> Connected to: Apache Hive (version 2.2.0-SNAPSHOT)
> Driver: Hive JDBC (version 2.2.0-SNAPSHOT)
> 16/08/15 18:09:15 [main]: WARN jdbc.HiveConnection: Request to set autoCommit 
> to false; Hive does not support autoCommit=false.
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Beeline version 2.2.0-SNAPSHOT by Apache Hive
> 0: jdbc:hive2://localhost:10000> !quit
> Closing: 0: jdbc:hive2://localhost:10000
> {noformat}
> {noformat}
> $ ./beeline
> Beeline version 2.2.0-SNAPSHOT by Apache Hive
> beeline> !connect "jdbc:hive2://localhost:10000"
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in 
> [jar:file:/Users/vihang/work/src/upstream/hive/packaging/target/apache-hive-2.2.0-SNAPSHOT-bin/apache-hive-2.2.0-SNAPSHOT-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in 
> [jar:file:/usr/local/Cellar/hadoop/2.7.2/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.
> SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
> Connecting to jdbc:hive2://localhost:10000
> Enter username for jdbc:hive2://localhost:10000: hive
> Enter password for jdbc:hive2://localhost:10000: ****
> Connected to: Apache Hive (version 2.2.0-SNAPSHOT)
> Driver: Hive JDBC (version 2.2.0-SNAPSHOT)
> 16/08/15 18:09:03 [main]: WARN jdbc.HiveConnection: Request to set autoCommit 
> to false; Hive does not support autoCommit=false.
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> 0: jdbc:hive2://localhost:10000> !quit
> Closing: 0: jdbc:hive2://localhost:10000
> {noformat}



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

Reply via email to