public interface DatabaseAccessor
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.Pair<String,String> |
getBounds(org.apache.hadoop.conf.Configuration conf,
String partitionColumn,
boolean lower,
boolean upper) |
List<String> |
getColumnNames(org.apache.hadoop.conf.Configuration conf) |
List<TypeInfo> |
getColumnTypes(org.apache.hadoop.conf.Configuration conf)
Returns a list of types for the columns in the specified configuration.
|
JdbcRecordIterator |
getRecordIterator(org.apache.hadoop.conf.Configuration conf,
String partitionColumn,
String lowerBound,
String upperBound,
int limit,
int offset) |
org.apache.hadoop.mapreduce.RecordWriter |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
int |
getTotalNumberOfRecords(org.apache.hadoop.conf.Configuration conf) |
boolean |
needColumnQuote() |
List<String> getColumnNames(org.apache.hadoop.conf.Configuration conf) throws HiveJdbcDatabaseAccessException
HiveJdbcDatabaseAccessExceptionList<TypeInfo> getColumnTypes(org.apache.hadoop.conf.Configuration conf) throws HiveJdbcDatabaseAccessException
TypeInfoFactory.unknownTypeInfo is used.
There is a one-to-one correspondence between the types returned in this method and the column
names obtained with getColumnNames(Configuration).
Implementors of the method can derive the types by querying the database, exploit the state
of the accessor, or use the configuration.HiveJdbcDatabaseAccessException - if some error occurs while accessing the databaseint getTotalNumberOfRecords(org.apache.hadoop.conf.Configuration conf)
throws HiveJdbcDatabaseAccessException
HiveJdbcDatabaseAccessExceptionJdbcRecordIterator getRecordIterator(org.apache.hadoop.conf.Configuration conf, String partitionColumn, String lowerBound, String upperBound, int limit, int offset) throws HiveJdbcDatabaseAccessException
HiveJdbcDatabaseAccessExceptionorg.apache.hadoop.mapreduce.RecordWriter getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
IOExceptionorg.apache.commons.lang3.tuple.Pair<String,String> getBounds(org.apache.hadoop.conf.Configuration conf, String partitionColumn, boolean lower, boolean upper) throws HiveJdbcDatabaseAccessException
HiveJdbcDatabaseAccessExceptionboolean needColumnQuote()
Copyright © 2022 The Apache Software Foundation. All rights reserved.