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.
|
| Constructor and Description |
|---|
HiveJdbcCommon() |
| Modifier and Type | Method and Description |
|---|---|
static long |
convertToAvroStream(ResultSet rs,
OutputStream outStream) |
static long |
convertToAvroStream(ResultSet rs,
OutputStream outStream,
String recordName,
HiveJdbcCommon.ResultSetRowCallback callback) |
static long |
convertToCsvStream(ResultSet rs,
OutputStream outStream) |
static long |
convertToCsvStream(ResultSet rs,
OutputStream outStream,
String recordName,
HiveJdbcCommon.ResultSetRowCallback callback) |
static org.apache.avro.Schema |
createSchema(ResultSet rs) |
static org.apache.avro.Schema |
createSchema(ResultSet rs,
String recordName)
Creates an Avro schema from a result set.
|
static org.apache.hadoop.conf.Configuration |
getConfigurationFromFiles(String configFiles) |
public static long convertToAvroStream(ResultSet rs, OutputStream outStream) throws SQLException, IOException
SQLExceptionIOExceptionpublic static long convertToAvroStream(ResultSet rs, OutputStream outStream, String recordName, HiveJdbcCommon.ResultSetRowCallback callback) throws SQLException, IOException
SQLExceptionIOExceptionpublic static org.apache.avro.Schema createSchema(ResultSet rs) throws SQLException
SQLExceptionpublic static org.apache.avro.Schema createSchema(ResultSet rs, String recordName) 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.SQLException - if any error occurs during conversionpublic static long convertToCsvStream(ResultSet rs, OutputStream outStream) throws SQLException, IOException
SQLExceptionIOExceptionpublic static long convertToCsvStream(ResultSet rs, OutputStream outStream, String recordName, HiveJdbcCommon.ResultSetRowCallback callback) throws SQLException, IOException
SQLExceptionIOExceptionpublic static org.apache.hadoop.conf.Configuration getConfigurationFromFiles(String configFiles)
Copyright © 2017 Apache NiFi Project. All rights reserved.