commit 66ffeaaf420ba8aa76a1da13b27ed94fad15de82 Author: Vihang Karajgaonkar Date: Fri May 20 14:09:13 2016 -0700 HIVE-13797: Provide a connection string example in beeline diff --git a/beeline/src/main/resources/BeeLine.properties b/beeline/src/main/resources/BeeLine.properties index 16f23a8999670aac8c7c07bb90f895501be47ead..c3c6034f94d3bed94c9ab081629ecc9e00376dfc 100644 --- a/beeline/src/main/resources/BeeLine.properties +++ b/beeline/src/main/resources/BeeLine.properties @@ -144,7 +144,6 @@ time-ms: ({0,number,#.###} seconds) cmd-usage: Usage: java org.apache.hive.cli.beeline.BeeLine \n \ \ -u the JDBC URL to connect to\n \ -\ -r reconnect to last saved connect url (in conjunction with !save)\n \ \ -n the username to connect as\n \ \ -p the password to connect as\n \ \ -d the driver class to use\n \ @@ -188,6 +187,16 @@ cmd-usage: Usage: java org.apache.hive.cli.beeline.BeeLine \n \ \ --addlocaldrivername=DRIVERNAME Add drvier name needs to be supported in the beeline client side\n \ \ --showConnectedUrl=[true/false] Prompt HiveServer2's URI to which this beeline connected.\n \ \ Only works for HiveServer2 cluster mode.\n \ -\ --help display this message - - +\ --help display this message\n \ +\n \ +\ Example:\n \ +\ 1. Connect using simple authentication to HiveServer2 on localhost:10000\n \ +\ $ beeline -u jdbc:hive2://localhost:10000 username password\n \ +\ 2. Connect using simple authentication to HiveServer2 on hs.local:10000 using -n for username and -p for password\n \ +\ $ beeline -n username -p password -u jdbc:hive2://hs2.local:10012\n \ +\ 3. Connect using Kerberos authentication with hive/localhost@mydomain.com as HiveServer2 principal\n \ +\ $ beeline -u "jdbc:hive2://hs2.local:10013/default;principal=hive/localhost@mydomain.com\n \ +\ 4. Connect using SSL connection to HiveServer2 on localhost at 10000\n \ +\ $ beeline jdbc:hive2://localhost:10000/default;ssl=true;sslTrustStore=/usr/local/truststore;trustStorePassword=mytruststorepassword\n \ +\ 5. Connect using LDAP authentication\n \ +\ $ beeline -u jdbc:hive2://hs2.local:10013/default