public class HiveSchemaHelper extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HiveSchemaHelper.DerbyCommandParser |
static class |
HiveSchemaHelper.HiveCommandParser |
static class |
HiveSchemaHelper.MetaStoreConnectionInfo |
static class |
HiveSchemaHelper.MSSQLCommandParser |
static class |
HiveSchemaHelper.MySqlCommandParser |
static interface |
HiveSchemaHelper.NestedScriptParser |
static class |
HiveSchemaHelper.OracleCommandParser |
static class |
HiveSchemaHelper.PostgresCommandParser |
Modifier and Type | Field and Description |
---|---|
static String |
DB_DERBY |
static String |
DB_HIVE |
static String |
DB_MSSQL |
static String |
DB_MYSQL |
static String |
DB_ORACLE |
static String |
DB_POSTGRACE |
static String |
EMBEDDED_HS2_URL |
static String |
HIVE_JDBC_DRIVER |
Constructor and Description |
---|
HiveSchemaHelper() |
Modifier and Type | Method and Description |
---|---|
static Connection |
getConnectionToMetastore(HiveSchemaHelper.MetaStoreConnectionInfo info,
String schema) |
static Connection |
getConnectionToMetastore(String userName,
String password,
String url,
String driver,
boolean printInfo,
org.apache.hadoop.conf.Configuration conf,
String schema)
Get JDBC connection to metastore db
|
static HiveSchemaHelper.NestedScriptParser |
getDbCommandParser(String dbName,
boolean usingSqlLine) |
static HiveSchemaHelper.NestedScriptParser |
getDbCommandParser(String dbName,
String metaDbName,
boolean usingSqlLine) |
static HiveSchemaHelper.NestedScriptParser |
getDbCommandParser(String dbName,
String dbOpts,
String msUsername,
String msPassword,
org.apache.hadoop.conf.Configuration conf,
String metaDbType,
boolean usingSqlLine) |
static String |
getValidConfVar(MetastoreConf.ConfVars confVar,
org.apache.hadoop.conf.Configuration conf) |
public static final String DB_DERBY
public static final String DB_HIVE
public static final String DB_MSSQL
public static final String DB_MYSQL
public static final String DB_POSTGRACE
public static final String DB_ORACLE
public static final String EMBEDDED_HS2_URL
public static final String HIVE_JDBC_DRIVER
public static Connection getConnectionToMetastore(String userName, String password, String url, String driver, boolean printInfo, org.apache.hadoop.conf.Configuration conf, String schema) throws HiveMetaException
userName
- metastore connection usernamepassword
- metastore connection passwordurl
- Metastore URL. If null will be read from config file.driver
- Driver class. If null will be read from config file.printInfo
- print connection parametersconf
- hive config objectschema
- the schema to create the connection forHiveMetaException
public static Connection getConnectionToMetastore(HiveSchemaHelper.MetaStoreConnectionInfo info, String schema) throws HiveMetaException
HiveMetaException
public static String getValidConfVar(MetastoreConf.ConfVars confVar, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static HiveSchemaHelper.NestedScriptParser getDbCommandParser(String dbName, boolean usingSqlLine)
public static HiveSchemaHelper.NestedScriptParser getDbCommandParser(String dbName, String metaDbName, boolean usingSqlLine)
Copyright © 2022 The Apache Software Foundation. All rights reserved.