Class ElasticSinks

java.lang.Object
com.hazelcast.jet.elastic.ElasticSinks

@Deprecated(forRemoval=true, since="5.7") public final class ElasticSinks extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Provides factory methods for Elasticsearch sinks. Alternatively you can use ElasticSinkBuilder
Since:
Jet 4.2
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns new instance of ElasticSinkBuilder
    static <T> Sink<T>
    elastic(FunctionEx<? super T,? extends org.elasticsearch.action.DocWriteRequest<?>> mapToRequestFn)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an Elasticsearch sink, uses a local instance of Elasticsearch
    static <T> Sink<T>
    elastic(SupplierEx<org.elasticsearch.client.RestClientBuilder> clientFn, FunctionEx<? super T,? extends org.elasticsearch.action.DocWriteRequest<?>> mapToRequestFn)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an Elasticsearch sink, uses a client obtained from clientFn and maps items using given mapToRequestFn

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • elastic

      @Nonnull public static <T> Sink<T> elastic(@Nonnull FunctionEx<? super T,? extends org.elasticsearch.action.DocWriteRequest<?>> mapToRequestFn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an Elasticsearch sink, uses a local instance of Elasticsearch

      Usage:

      Sink<Map<String, Object>> sink = ElasticSinks.elastic(
         map -> new IndexRequest("my-index").source(map)
       );
      Parameters:
      mapToRequestFn - function that maps an item from a pipeline to an indexing request
    • elastic

      @Nonnull public static <T> Sink<T> elastic(@Nonnull SupplierEx<org.elasticsearch.client.RestClientBuilder> clientFn, @Nonnull FunctionEx<? super T,? extends org.elasticsearch.action.DocWriteRequest<?>> mapToRequestFn)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an Elasticsearch sink, uses a client obtained from clientFn and maps items using given mapToRequestFn

      Usage:

      Sink<Map<String, Object>> sink = ElasticSinks.elastic(
         () -> ElasticClients.client("es-host", 9200),
         map -> new IndexRequest("my-index").source(map)
       );
      Type Parameters:
      T - type of incoming items
      Parameters:
      clientFn - supplier function returning configured RestClientBuilder
      mapToRequestFn - function that maps an item from a pipeline to an indexing request
    • builder

      @Nonnull public static ElasticSinkBuilder<Void> builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns new instance of ElasticSinkBuilder