public abstract class AbstractJDBCConnectorProvider extends AbstractDataConnectorProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
JDBC_CATALOG |
static String |
JDBC_CONFIG_PREFIX |
static String |
JDBC_CONNECTOR_PREFIX |
static String |
JDBC_DATABASE_TYPE |
static String |
JDBC_DRIVER |
static String |
JDBC_HIVE_STORAGE_HANDLER_ID |
static String |
JDBC_KEY |
static String |
JDBC_KEYSTORE |
static String |
JDBC_LOW_BOUND |
static String |
JDBC_NUM_PARTITIONS |
static String |
JDBC_PARTITION_COLUMN |
static String |
JDBC_PASSWORD |
static String |
JDBC_QUERY |
static String |
JDBC_QUERY_FIELD_NAMES |
static String |
JDBC_QUERY_FIELD_TYPES |
static String |
JDBC_SCHEMA |
static String |
JDBC_SPLIT_QUERY |
static String |
JDBC_TABLE |
static String |
JDBC_UPPER_BOUND |
static String |
JDBC_URL |
static String |
JDBC_USERNAME |
protected static Warehouse |
warehouse |
connector, driverClassName, handle, scoped_dbDERBY_TYPE, HIVE_JDBC_TYPE, MSSQL_TYPE, MYSQL_TYPE, ORACLE_TYPE, POSTGRES_TYPE| Constructor and Description |
|---|
AbstractJDBCConnectorProvider(String dbName,
DataConnector dataConn,
String driverClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes a transport/connection to the datasource.
|
protected ResultSet |
fetchTableMetadata(String tableName) |
protected ResultSet |
fetchTableNames()
Returns a list of all table names from the remote database.
|
protected abstract String |
getCatalogName() |
protected Connection |
getConnection() |
protected Properties |
getConnectionProperties() |
protected abstract String |
getDatabaseName() |
protected String |
getDatasourceType() |
protected String |
getDataType(String mySqlType,
int size) |
protected String |
getInputClass() |
protected String |
getOutputClass() |
Table |
getTable(String tableName)
Fetch a single table with the given name, returns a Hive Table object from the remote database
|
protected String |
getTableLocation(String tableName) |
List<String> |
getTableNames()
Returns a list of all table names from the remote database.
|
List<Table> |
getTables(String regex)
Returns Hive Table objects from the remote database for tables that match a name pattern.
|
protected boolean |
isClosed() |
protected boolean |
isOpen() |
void |
open()
Opens a transport/connection to the datasource.
|
protected String |
wrapSize(int size) |
alterTable, buildTableFromColsList, createTable, dropTable, setScopeprotected static Warehouse warehouse
public static final String JDBC_HIVE_STORAGE_HANDLER_ID
public static final String JDBC_CONFIG_PREFIX
public static final String JDBC_CATALOG
public static final String JDBC_SCHEMA
public static final String JDBC_TABLE
public static final String JDBC_DATABASE_TYPE
public static final String JDBC_URL
public static final String JDBC_DRIVER
public static final String JDBC_USERNAME
public static final String JDBC_PASSWORD
public static final String JDBC_KEYSTORE
public static final String JDBC_KEY
public static final String JDBC_QUERY
public static final String JDBC_QUERY_FIELD_NAMES
public static final String JDBC_QUERY_FIELD_TYPES
public static final String JDBC_SPLIT_QUERY
public static final String JDBC_PARTITION_COLUMN
public static final String JDBC_NUM_PARTITIONS
public static final String JDBC_LOW_BOUND
public static final String JDBC_UPPER_BOUND
public static final String JDBC_CONNECTOR_PREFIX
public AbstractJDBCConnectorProvider(String dbName, DataConnector dataConn, String driverClass)
public void open()
throws ConnectException
AbstractDataConnectorProvideropen in interface IDataConnectorProvideropen in class AbstractDataConnectorProviderConnectException - if the connection could not be established for some reason.protected Connection getConnection()
protected boolean isOpen()
protected boolean isClosed()
public void close()
AbstractDataConnectorProviderclose in interface IDataConnectorProviderclose in class AbstractDataConnectorProviderpublic List<Table> getTables(String regex) throws MetaException
getTables in interface IDataConnectorProvidergetTables in class AbstractDataConnectorProviderregex - MetaException - To indicate any failures with executing this APIpublic List<String> getTableNames() throws MetaException
getTableNames in interface IDataConnectorProvidergetTableNames in class AbstractDataConnectorProviderMetaException - To indicate any failures with executing this APIprotected ResultSet fetchTableMetadata(String tableName) throws MetaException
MetaExceptionprotected ResultSet fetchTableNames() throws MetaException
MetaException - To indicate any failures with executing this APIprotected abstract String getCatalogName()
protected abstract String getDatabaseName()
public Table getTable(String tableName) throws MetaException
getTable in interface IDataConnectorProvidergetTable in class AbstractDataConnectorProvidertableName - MetaException - To indicate any failures with executing this APIprotected String wrapSize(int size)
protected String getInputClass()
getInputClass in class AbstractDataConnectorProviderprotected String getOutputClass()
getOutputClass in class AbstractDataConnectorProviderprotected String getTableLocation(String tableName)
getTableLocation in class AbstractDataConnectorProviderprotected Properties getConnectionProperties()
protected String getDatasourceType()
getDatasourceType in class AbstractDataConnectorProviderCopyright © 2024 The Apache Software Foundation. All rights reserved.