public class HiveJdbcCommon extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
HiveJdbcCommon.ResultSetRowCallback
An interface for callback methods which allows processing of a row during the convertToXYZStream() processing.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
AVRO |
static String |
CSV |
static String |
CSV_MIME_TYPE |
static String |
MIME_TYPE_AVRO_BINARY |
static PropertyDescriptor |
NORMALIZE_NAMES_FOR_AVRO |
| Constructor and Description |
|---|
HiveJdbcCommon() |
| Modifier and Type | Method and Description |
|---|---|
static long |
convertToAvroStream(ResultSet rs,
OutputStream outStream,
int maxRows,
boolean convertNames) |
static long |
convertToAvroStream(ResultSet rs,
OutputStream outStream,
String recordName,
int maxRows,
boolean convertNames,
HiveJdbcCommon.ResultSetRowCallback callback) |
static long |
convertToCsvStream(ResultSet rs,
OutputStream outStream,
CsvOutputOptions outputOptions) |
static long |
convertToCsvStream(ResultSet rs,
OutputStream outStream,
String recordName,
HiveJdbcCommon.ResultSetRowCallback callback,
CsvOutputOptions outputOptions) |
static org.apache.avro.Schema |
createSchema(ResultSet rs,
boolean convertNames) |
static org.apache.avro.Schema |
createSchema(ResultSet rs,
String recordName,
boolean convertNames)
Creates an Avro schema from a result set.
|
static org.apache.hadoop.conf.Configuration |
getConfigurationFromFiles(String configFiles) |
static String |
normalizeNameForAvro(String inputName) |
public static final String AVRO
public static final String CSV
public static final String MIME_TYPE_AVRO_BINARY
public static final String CSV_MIME_TYPE
public static final PropertyDescriptor NORMALIZE_NAMES_FOR_AVRO
public static long convertToAvroStream(ResultSet rs, OutputStream outStream, int maxRows, boolean convertNames) throws SQLException, IOException
SQLExceptionIOExceptionpublic static long convertToAvroStream(ResultSet rs, OutputStream outStream, String recordName, int maxRows, boolean convertNames, HiveJdbcCommon.ResultSetRowCallback callback) throws SQLException, IOException
SQLExceptionIOExceptionpublic static org.apache.avro.Schema createSchema(ResultSet rs, boolean convertNames) throws SQLException
SQLExceptionpublic static org.apache.avro.Schema createSchema(ResultSet rs, String recordName, boolean convertNames) throws SQLException
rs - The result set to convert to AvrorecordName - The a priori record name to use if it cannot be determined from the result set.convertNames - Whether to convert column/table names to be legal Avro namesSQLException - if any error occurs during conversionpublic static long convertToCsvStream(ResultSet rs, OutputStream outStream, CsvOutputOptions outputOptions) throws SQLException, IOException
SQLExceptionIOExceptionpublic static long convertToCsvStream(ResultSet rs, OutputStream outStream, String recordName, HiveJdbcCommon.ResultSetRowCallback callback, CsvOutputOptions outputOptions) throws SQLException, IOException
SQLExceptionIOExceptionpublic static org.apache.hadoop.conf.Configuration getConfigurationFromFiles(String configFiles)
Copyright © 2023 Apache NiFi Project. All rights reserved.