org.apache.hadoop.hive.jdbc
Class HiveDriver

java.lang.Object
  extended by org.apache.hadoop.hive.jdbc.HiveDriver
All Implemented Interfaces:
Driver

public class HiveDriver
extends Object
implements Driver

HiveDriver.


Constructor Summary
HiveDriver()
           
 
Method Summary
 boolean acceptsURL(String url)
          Checks whether a given url is in a valid format.
 Connection connect(String url, Properties info)
           
 int getMajorVersion()
          Returns the major version of this driver.
 int getMinorVersion()
          Returns the minor version of this driver.
 DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
           
 boolean jdbcCompliant()
          Returns whether the driver is JDBC compliant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveDriver

public HiveDriver()
Method Detail

acceptsURL

public boolean acceptsURL(String url)
                   throws SQLException
Checks whether a given url is in a valid format. The current uri format is: jdbc:hive://[host[:port]] jdbc:hive:// - run in embedded mode jdbc:hive://localhost - connect to localhost default port (10000) jdbc:hive://localhost:5050 - connect to localhost port 5050 TODO: - write a better regex. - decide on uri format

Specified by:
acceptsURL in interface Driver
Throws:
SQLException

connect

public Connection connect(String url,
                          Properties info)
                   throws SQLException
Specified by:
connect in interface Driver
Throws:
SQLException

getMajorVersion

public int getMajorVersion()
Returns the major version of this driver.

Specified by:
getMajorVersion in interface Driver

getMinorVersion

public int getMinorVersion()
Returns the minor version of this driver.

Specified by:
getMinorVersion in interface Driver

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url,
                                            Properties info)
                                     throws SQLException
Specified by:
getPropertyInfo in interface Driver
Throws:
SQLException

jdbcCompliant

public boolean jdbcCompliant()
Returns whether the driver is JDBC compliant.

Specified by:
jdbcCompliant in interface Driver


Copyright © 2013 The Apache Software Foundation