You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ouywl <ou...@139.com> on 2019/10/16 07:25:34 UTC
Elasticsearch6UpsertTableSink how to trigger es delete index。
Hi,
When I use Elasticsearch6UpsertTableSink, and It seems implements delete index. Like code:
@Override
public void process(Tuple2<Boolean, Row> element, RuntimeContext ctx, RequestIndexer indexer) {
if (element.f0) {
processUpsert(element.f1, indexer);
} else {
processDelete(element.f1, indexer);
}
}
[I don’t which condition can trigger element.f0 == false and delete es index
call processDelete() ](https://maas.mail.163.com/dashi-web-
extend/html/proSignature.html?ftlId=1&name=ouywl&uid=ouywl%40139.com&iconUrl=https%3A%2F%2Fmail-
online.nosdn.127.net%2Fsma8dc7719018ba2517da7111b3db5a170.jpg&items=%5B%22ouywl%40139.com%22%5D)[

| ouywl
---|---
ouywl@139.com
](https://maas.mail.163.com/dashi-web-
extend/html/proSignature.html?ftlId=1&name=ouywl&uid=ouywl%40139.com&iconUrl=https%3A%2F%2Fmail-
online.nosdn.127.net%2Fsma8dc7719018ba2517da7111b3db5a170.jpg&items=%5B%22ouywl%40139.com%22%5D)
签名由 [网易邮箱大师](https://mail.163.com/dashi/dlpro.html?from=mail81) 定制
Re: Elasticsearch6UpsertTableSink how to trigger es delete index。
Posted by Piotr Nowojski <pi...@ververica.com>.
Hi,
Take a look at the documentation. This [1] describes an example were a running query can produce updated results (and thus retracting the previous results).
[1] https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/streaming/dynamic_tables.html#table-to-stream-conversion <https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/streaming/dynamic_tables.html#table-to-stream-conversion>
Piotrek
> On 16 Oct 2019, at 09:25, ouywl <ou...@139.com> wrote:
>
>
> Hi,
> When I use Elasticsearch6UpsertTableSink, and It seems implements delete index. Like code:
> @Override
> public void process(Tuple2<Boolean, Row> element, RuntimeContext ctx, RequestIndexer indexer) {
> if (element.f0) {
> processUpsert(element.f1, indexer);
> } else {
> processDelete(element.f1, indexer);
> }
> }
> I don’t which condition can trigger element.f0 == false and delete es index call processDelete()
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=ouywl&uid=ouywl%40139.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsma8dc7719018ba2517da7111b3db5a170.jpg&items=%5B%22ouywl%40139.com%22%5D>
>
>
> ouywl
> ouywl@139.com
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=ouywl&uid=ouywl%40139.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsma8dc7719018ba2517da7111b3db5a170.jpg&items=%5B%22ouywl%40139.com%22%5D>
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>
>