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

Naveen Gangam commented on HIVE-22355:
--------------------------------------

[~matijhs] Just tuning in. I am trying to understand the problem we are seeing 
here. I understand that beeline prompts for password even when auth=NONE. Are 
we trying to resolve this issue specifically for sqoop or for something else? 
can we not use one of the workarounds to resolve this
1) beeline accepts a "-n" and a "-p" as command line arguments for username and 
password. we could use "" for both or any other values.
2) the beeline url itself can contain "user=" and "password=" as well.
3) Sqoop can also use beeline-site.xml file with named URLs in it or a 
.beeline.properties. So when it runs beeline, its not prompted for credentials 
regardless of the AUTH.

Having said that, (apologies for taking a different direction) beeline should 
support the option for no credentials as JDBC supports 
DriverManager.getConnect(url) with just the URL. But should this be 
irrespective of AUTH value set in config or URL. This will allow the connection 
to fail if the server rejects it, instead of defaulting to something the user 
is unaware of. I have to give this a bit more thought but just throwing it out 
there for discussion. Thanks

> Beeline should not prompt for hive user and password when authentication is 
> NONE
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-22355
>                 URL: https://issues.apache.org/jira/browse/HIVE-22355
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>            Reporter: Mate Juhasz
>            Assignee: Mate Juhasz
>            Priority: Major
>         Attachments: HIVE-22355.1.patch, HIVE-22355.2.patch, 
> HIVE-22355.3.patch
>
>
> Beeline - without adding the jdbc url - prompts for username and password in 
> case hive.server2.authentication=NONE, which is possibly pointless and can be 
> misleading for users as any input is accepted.
> In addition, Sqoop has dropped hive cli recently in favor of beeline and if 
> there is no authentication set in Hive, Sqoop fails to connect as the process 
> stops waiting for the user/password input. 
> I think it would be nice to check the auth type "NONE" before reading unused 
> inputs from the console before this point:
> https://github.com/apache/hive/blob/master/beeline/src/java/org/apache/hive/beeline/Commands.java#L1641



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to