hi,
    flink streaming(版本1.12.5) 写es的时候ElasticsearchSink.Builder发现没有设置配置的地方,比如要想设置 
number_of_shards。哪位大佬知道,请教一下!


ElasticsearchSink.Builder<String>esSinkBuilder=newElasticsearchSink.Builder<>(httpHosts,newElasticsearchSinkFunction<String>(){publicIndexRequestcreateIndexRequest(Stringelement){Map<String,String>json=newHashMap<>();json.put("data",element);returnRequests.indexRequest().index("my-index").type("my-type").source(json);}@Overridepublicvoidprocess(Stringelement,RuntimeContextctx,RequestIndexerindexer){indexer.add(createIndexRequest(element));}})
| |
allanqinjy
|
|
allanqi...@163.com
|
签名由网易邮箱大师定制

回复