Package com.github.euler.elasticsearch
Class ElasticsearchMetadataSink
- java.lang.Object
-
- com.github.euler.elasticsearch.ElasticsearchMetadataSink
-
- All Implemented Interfaces:
MetadataBatchSink
- Direct Known Subclasses:
ElasticsearchFragmentSink
public class ElasticsearchMetadataSink extends Object implements MetadataBatchSink
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchMetadataSink(org.elasticsearch.client.RestHighLevelClient client, String index, FlushConfig flushConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(org.elasticsearch.action.index.IndexRequest req)protected Map<String,Object>buildSource(URI uri, ProcessingContext ctx)voidfinish()SinkResponseflush(boolean force)protected SinkResponseflush(String id, boolean force)protected StringgenerateId(URI uri, ProcessingContext ctx)protected StringgetIndex()SinkResponsestore(URI uri, ProcessingContext ctx)
-
-
-
Constructor Detail
-
ElasticsearchMetadataSink
public ElasticsearchMetadataSink(org.elasticsearch.client.RestHighLevelClient client, String index, FlushConfig flushConfig)
-
-
Method Detail
-
store
public SinkResponse store(URI uri, ProcessingContext ctx)
- Specified by:
storein interfaceMetadataBatchSink
-
buildSource
protected Map<String,Object> buildSource(URI uri, ProcessingContext ctx)
-
generateId
protected String generateId(URI uri, ProcessingContext ctx)
-
add
protected void add(org.elasticsearch.action.index.IndexRequest req)
-
flush
public SinkResponse flush(boolean force)
- Specified by:
flushin interfaceMetadataBatchSink
-
flush
protected SinkResponse flush(String id, boolean force)
-
finish
public void finish()
- Specified by:
finishin interfaceMetadataBatchSink
-
getIndex
protected String getIndex()
-
-