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

Vihang Karajgaonkar commented on HIVE-14063:
--------------------------------------------

I think beeline.properties should ideally be the right name for this but since 
we already have a BeeLine.properties file which is used by beeline 
ResourceBundle it causes exceptions like below if we have beeline.properties

{code}
java.util.MissingResourceException: Can't find resource for bundle 
java.util.PropertyResourceBundle, key help-addlocaldrivername
        at java.util.ResourceBundle.getObject(ResourceBundle.java:395)
        at java.util.ResourceBundle.getString(ResourceBundle.java:355)
        at org.apache.hive.beeline.BeeLine.loc(BeeLine.java:470)
        at org.apache.hive.beeline.BeeLine.loc(BeeLine.java:447)
        at 
org.apache.hive.beeline.ReflectiveCommandHandler.<init>(ReflectiveCommandHandler.java:45)
        at org.apache.hive.beeline.BeeLine.<init>(BeeLine.java:176)
        at org.apache.hive.beeline.BeeLine.<init>(BeeLine.java:519)
        at 
org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:509)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:493)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
{code}


Hence the other good name for this file could be beeline.conf instead of 
beeline-default.properties.

> beeline to auto connect to the HiveServer2
> ------------------------------------------
>
>                 Key: HIVE-14063
>                 URL: https://issues.apache.org/jira/browse/HIVE-14063
>             Project: Hive
>          Issue Type: Improvement
>          Components: Beeline
>            Reporter: Vihang Karajgaonkar
>            Assignee: Vihang Karajgaonkar
>            Priority: Minor
>
> Currently one has to give an jdbc:hive2 url in order for Beeline to connect a 
> hiveserver2 instance. It would be great if Beeline can get the info somehow 
> (from a properties file at a well-known location?) and connect automatically 
> if user doesn't specify such a url. If the properties file is not present, 
> then beeline would expect user to provide the url and credentials using 
> !connect or ./beeline -u .. commands
> While Beeline is flexible (being a mere JDBC client), most environments would 
> have just a single HS2. Having users to manually connect into this via either 
> "beeline ~/.propsfile" or -u or !connect statements is lowering the 
> experience part.



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

Reply via email to