@Internal public abstract class ElasticsearchUpsertTableSinkBase extends Object implements org.apache.flink.table.sinks.UpsertStreamTableSink<Row>
UpsertStreamTableSink
.Modifier and Type | Class and Description |
---|---|
static class |
ElasticsearchUpsertTableSinkBase.ElasticsearchUpsertSinkFunction
Sink function for converting upserts into Elasticsearch
ActionRequest s. |
static class |
ElasticsearchUpsertTableSinkBase.Host
Entity for describing a host of Elasticsearch.
|
static interface |
ElasticsearchUpsertTableSinkBase.RequestFactory
For version-agnostic creating of
ActionRequest s. |
static class |
ElasticsearchUpsertTableSinkBase.SinkOption
Keys for optional parameterization of the sink.
|
Constructor and Description |
---|
ElasticsearchUpsertTableSinkBase(boolean isAppendOnly,
TableSchema schema,
List<ElasticsearchUpsertTableSinkBase.Host> hosts,
String index,
String docType,
String keyDelimiter,
String keyNullLiteral,
SerializationSchema<Row> serializationSchema,
org.elasticsearch.common.xcontent.XContentType contentType,
ActionRequestFailureHandler failureHandler,
Map<ElasticsearchUpsertTableSinkBase.SinkOption,String> sinkOptions,
ElasticsearchUpsertTableSinkBase.RequestFactory requestFactory) |
public ElasticsearchUpsertTableSinkBase(boolean isAppendOnly, TableSchema schema, List<ElasticsearchUpsertTableSinkBase.Host> hosts, String index, String docType, String keyDelimiter, String keyNullLiteral, SerializationSchema<Row> serializationSchema, org.elasticsearch.common.xcontent.XContentType contentType, ActionRequestFailureHandler failureHandler, Map<ElasticsearchUpsertTableSinkBase.SinkOption,String> sinkOptions, ElasticsearchUpsertTableSinkBase.RequestFactory requestFactory)
public void setKeyFields(String[] keyNames)
setKeyFields
in interface org.apache.flink.table.sinks.UpsertStreamTableSink<Row>
public void setIsAppendOnly(Boolean isAppendOnly)
setIsAppendOnly
in interface org.apache.flink.table.sinks.UpsertStreamTableSink<Row>
public TypeInformation<Row> getRecordType()
getRecordType
in interface org.apache.flink.table.sinks.UpsertStreamTableSink<Row>
public void emitDataStream(DataStream<Tuple2<Boolean,Row>> dataStream)
public TypeInformation<Tuple2<Boolean,Row>> getOutputType()
public String[] getFieldNames()
public TypeInformation<?>[] getFieldTypes()
public org.apache.flink.table.sinks.TableSink<Tuple2<Boolean,Row>> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
protected abstract ElasticsearchUpsertTableSinkBase copy(boolean isAppendOnly, TableSchema schema, List<ElasticsearchUpsertTableSinkBase.Host> hosts, String index, String docType, String keyDelimiter, String keyNullLiteral, SerializationSchema<Row> serializationSchema, org.elasticsearch.common.xcontent.XContentType contentType, ActionRequestFailureHandler failureHandler, Map<ElasticsearchUpsertTableSinkBase.SinkOption,String> sinkOptions, ElasticsearchUpsertTableSinkBase.RequestFactory requestFactory)
protected abstract SinkFunction<Tuple2<Boolean,Row>> createSinkFunction(List<ElasticsearchUpsertTableSinkBase.Host> hosts, ActionRequestFailureHandler failureHandler, Map<ElasticsearchUpsertTableSinkBase.SinkOption,String> sinkOptions, ElasticsearchUpsertTableSinkBase.ElasticsearchUpsertSinkFunction upsertFunction)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.