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 |
withStatementId(int statementId)
Specify this parameter to set an statement id in the writer.
|
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 |
withTableObject(Table table)
Specify the table object since sometimes no connections
to the metastore will be opened.
|
HiveStreamingConnection.Builder |
withTransactionBatchSize(int transactionBatchSize)
Transaction batch size to use (default value is 10).
|
HiveStreamingConnection.Builder |
withWriteId(long writeId)
Specify this parameter if we want the current connection
to join an ongoing transaction without having to query
the metastore to create it.
|
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.Builder withWriteId(long writeId)
writeId
- write idpublic HiveStreamingConnection.Builder withStatementId(int statementId)
statementId
- statement idpublic HiveStreamingConnection.Builder withTableObject(Table table)
table
- table object.public HiveStreamingConnection connect() throws StreamingException
StreamingException
Copyright © 2022 The Apache Software Foundation. All rights reserved.