public static class HiveStreamingConnection.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
HiveStreamingConnection |
connect()
Returning a streaming connection to hive.
|
HiveStreamingConnection.Builder |
withAgentInfo(String agentInfo)
Specify agent info to use for streaming connection.
|
HiveStreamingConnection.Builder |
withDatabase(String database)
Specify database to use for streaming connection.
|
HiveStreamingConnection.Builder |
withHiveConf(HiveConf hiveConf)
Specify hive configuration object to use for streaming connection.
|
HiveStreamingConnection.Builder |
withRecordWriter(RecordWriter recordWriter)
Record writer to use for writing records to destination table.
|
HiveStreamingConnection.Builder |
withStaticPartitionValues(List<String> staticPartitionValues)
Specify the name of partition to use for streaming connection.
|
HiveStreamingConnection.Builder |
withStreamingOptimizations(boolean enable)
Whether to enable streaming optimizations.
|
HiveStreamingConnection.Builder |
withTable(String table)
Specify table to use for streaming connection.
|
HiveStreamingConnection.Builder |
withTransactionBatchSize(int transactionBatchSize)
Transaction batch size to use (default value is 10).
|
public HiveStreamingConnection.Builder withDatabase(String database)
database - - db namepublic HiveStreamingConnection.Builder withTable(String table)
table - - table namepublic HiveStreamingConnection.Builder withStaticPartitionValues(List<String> staticPartitionValues)
staticPartitionValues - - static partition valuespublic HiveStreamingConnection.Builder withAgentInfo(String agentInfo)
agentInfo - - agent infopublic HiveStreamingConnection.Builder withHiveConf(HiveConf hiveConf)
hiveConf - - hive conf object@InterfaceStability.Evolving public HiveStreamingConnection.Builder withTransactionBatchSize(int transactionBatchSize)
transactionBatchSize - - transaction batch sizepublic HiveStreamingConnection.Builder withStreamingOptimizations(boolean enable)
enable - - flag to enable or notpublic HiveStreamingConnection.Builder withRecordWriter(RecordWriter recordWriter)
recordWriter - - record writerpublic HiveStreamingConnection connect() throws StreamingException
StreamingExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.