flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mingleizhang <18717838...@163.com>
Subject How to verify the data to Elasticsearch whether correct or not ?
Date Tue, 15 Aug 2017 13:17:00 GMT
Hi, flink experts!

I sinked my data ( PB objects ) to elasticsearch. I dont know whether the sinked data is correct
or incorrect. The codes like following, Could you help me check it please ? Im not familar
with ES. Now, I want to install a kibana to view my data. But I dont know the below codes
is correct or incorrect. I ran the flink program. it does not give me an error. I just want
to confirm.

// sink the filtered data to ElasticSearch
clickStreamFiltered.addSink(new ElasticsearchSink[ActivityInfo](configElasticSearch, transportAddress,
new ElasticsearchSinkFunction[ActivityInfo] {
def createIndexRequest(element: ActivityInfo): IndexRequest = {
val json = new java.util.HashMap[String, ActivityInfo]
    json.put("data", element)
override def process(activityInfo: ActivityInfo, runtimeContext: RuntimeContext, requestIndexer:
RequestIndexer): Unit = {

View raw message