Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-28109

Delete useful code in the row emitter.

    XMLWordPrintableJSON

Details

    Description

       

      The `.id(key)` in the RowElasticsearchEmitter make users get confused.

      The following is the source code. key always null, we can never call the `id` method.

      if (key != null) {
          final UpdateRequest updateRequest =
                  new UpdateRequest(indexGenerator.generate(row), documentType, key)
                          .doc(document, contentType)
                          .upsert(document, contentType);
          indexer.add(updateRequest);
      } else {
          final IndexRequest indexRequest =
                  new IndexRequest(indexGenerator.generate(row), documentType)
                          .id(key)
                          .source(document, contentType);
          indexer.add(indexRequest);
      }

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ana4 Luning Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: