public class HiveJdbcConnector extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HIVESERVER_VERSION |
static String |
HIVE_EXECUTION_SIMULATE |
static String |
HIVESERVER_CONNECTION_STRING |
static String |
HIVESERVER_PASSWORD |
static String |
HIVESERVER_URL |
static String |
HIVESERVER_USER |
static String |
HIVESERVER_VERSION |
static String |
HIVESITE_DIR |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
executeStatements(String... statements)
Executes the given SQL statements.
|
Connection |
getConnection() |
static HiveJdbcConnector |
newConnectorWithProps(Properties compactRunProps)
Create a new
HiveJdbcConnector based on the configs in a Properties object |
static HiveJdbcConnector |
newEmbeddedConnector(int hiveServerVersion)
Create a new
HiveJdbcConnector using the specified Hive server version. |
public static final String HIVESERVER_VERSION
public static final String DEFAULT_HIVESERVER_VERSION
public static final String HIVESERVER_CONNECTION_STRING
public static final String HIVESERVER_URL
public static final String HIVESERVER_USER
public static final String HIVESERVER_PASSWORD
public static final String HIVESITE_DIR
public static final String HIVE_EXECUTION_SIMULATE
public static HiveJdbcConnector newEmbeddedConnector(int hiveServerVersion) throws SQLException
HiveJdbcConnector using the specified Hive server version.hiveServerVersion - is the Hive server version to useSQLExceptionpublic static HiveJdbcConnector newConnectorWithProps(Properties compactRunProps) throws SQLException
HiveJdbcConnector based on the configs in a Properties objectcompactRunProps - contains the configuration keys to construct the HiveJdbcConnectorSQLException - if there is a problem setting up the JDBC connectionpublic void executeStatements(String... statements) throws SQLException
statements - SQL statements to be executed.SQLException - if any issue in executing any statement.public Connection getConnection()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOException