## org.apache.hive.jdbc
Class Utils

    java.lang.Object
      org.apache.hive.jdbc.Utils

    public class Utils

extends Object

Nested Class Summary
`static class` `Utils.JdbcConnectionParams`

Field Summary
`static String` `DEFAULT_DATABASE` Hive's default database name
`static String` `DEFAULT_PORT` If host is provided, without a port.
`static String` `URL_PREFIX` The required prefix for the connection URL.

Constructor Summary
`Utils()`

Method Summary
`static Utils.JdbcConnectionParams` `parseURL(String uri)` Parse JDBC connection URL The new format of the URL is jdbc:hive2://<host>:<port>/dbName;sess_var_list?hive_conf_list#hive_var_list where the optional sess, conf and var lists are semicolon separated <key>=<val> pairs.
`static void` `verifySuccess(TStatus status)`
`static void` `verifySuccess(TStatus status, boolean withInfo)`
`static void` `verifySuccessWithInfo(TStatus status)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### URL_PREFIX

    public static final String URL_PREFIX

  The required prefix for the connection URL.

  See Also:
    Constant Field Values

### DEFAULT_PORT

    public static final String DEFAULT_PORT

  If host is provided, without a port.

  See Also:
    Constant Field Values

### DEFAULT_DATABASE

    public static final String DEFAULT_DATABASE

  Hive's default database name

  See Also:
    Constant Field Values

Constructor Detail

### Utils

    public Utils()

Method Detail

### verifySuccessWithInfo

    public static void verifySuccessWithInfo(TStatus status)
                                      throws SQLException

  Throws:
    `SQLException`

### verifySuccess

    public static void verifySuccess(TStatus status)
                              throws SQLException

  Throws:
    `SQLException`

### verifySuccess

    public static void verifySuccess(TStatus status,
                                     boolean withInfo)
                              throws SQLException

  Throws:
    `SQLException`

### parseURL

    public static Utils.JdbcConnectionParams parseURL(String uri)
                                               throws IllegalArgumentException

  Parse JDBC connection URL The new format of the URL is jdbc:hive2://<host>:<port>/dbName;sess_var_list?hive_conf_list#hive_var_list where the optional sess, conf and var lists are semicolon separated <key>=<val> pairs. As before, if the host/port is not specified, it the driver runs an embedded hive. examples - jdbc:hive2://ubuntu:11000/db2?hive.cli.conf.printheader=true;hive.exec.mode.local.auto.inputbytes.max=9999#stab=salesTable;icol=customerID jdbc:hive2://?hive.cli.conf.printheader=true;hive.exec.mode.local.auto.inputbytes.max=9999#stab=salesTable;icol=customerID jdbc:hive2://ubuntu:11000/db2;user=foo;password=bar Connect to http://server:10001/hs2, with specified basicAuth credentials and initial database: jdbc:hive2://server:10001/db;user=foo;password=bar?hive.server2.transport.mode=http;hive.server2.thrift.http.path=hs2 Note that currently the session properties are not used.

  Parameters:
    `uri` -
  Returns:
  Throws:
    `IllegalArgumentException`

Copyright © 2014 The Apache Software Foundation. All rights reserved.