public abstract class ElasticsearchSink extends Object implements Sink
| Modifier and Type | Field and Description |
|---|---|
protected SchemaGenerator |
schemaGenerator |
| Constructor and Description |
|---|
ElasticsearchSink(String cluster,
String index,
String type) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clear(MappingConfiguration mapping)
remove all traces of any loading that took or might have taken place for the provided mapping
|
protected boolean |
createMapping(MappingConfiguration mapping,
String indexId) |
abstract org.elasticsearch.client.Client |
getClient() |
protected String |
getCluster() |
boolean |
prepare(MappingConfiguration mapping)
Do whatever is required for the sink to be used, such as testing connections, inserting schemas, ...
|
ElasticsearchSink |
setSchemaGenerator(SchemaGenerator sg) |
boolean |
store(Collection<SinkRecord> records) |
boolean |
store(SinkRecord record) |
String |
toString() |
protected boolean |
updateMapping(String indexId,
MappingConfiguration mapping) |
protected SchemaGenerator schemaGenerator
public abstract org.elasticsearch.client.Client getClient()
protected String getCluster()
public boolean store(SinkRecord record)
public boolean store(Collection<SinkRecord> records)
public ElasticsearchSink setSchemaGenerator(SchemaGenerator sg)
public boolean prepare(MappingConfiguration mapping)
Sinkprotected boolean createMapping(MappingConfiguration mapping, String indexId)
protected boolean updateMapping(String indexId, MappingConfiguration mapping) throws SinkError
SinkErrorpublic boolean clear(MappingConfiguration mapping)
SinkCopyright © 2015–2017 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.