org.apache.storm.elasticsearch.common

## Class DefaultEsTupleMapper

- java.lang.Object
- - org.apache.storm.elasticsearch.common.DefaultEsTupleMapper

- All Implemented Interfaces:
    Serializable, EsTupleMapper

      public class DefaultEsTupleMapper
      extends Object
      implements EsTupleMapper

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEsTupleMapper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getId(ITuple tuple)` Extracts id from tuple.
    `String` | `getIndex(ITuple tuple)` Extracts index from tuple.
    `Map<String,String>` | `getParams(ITuple tuple, Map<String,String> defaultValue)` Extracts params from tuple if available.
    `String` | `getSource(ITuple tuple)` Extracts source from tuple.
    `String` | `getType(ITuple tuple)` Extracts type from tuple.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEsTupleMapper

          public DefaultEsTupleMapper()

  - ### Method Detail

    - #### getSource

          public String getSource(ITuple tuple)

      Description copied from interface: `EsTupleMapper`

      Extracts source from tuple.

      Specified by:
        `getSource` in interface `EsTupleMapper`
      Parameters:
        `tuple` - source tuple
      Returns:
        source

    - #### getIndex

          public String getIndex(ITuple tuple)

      Description copied from interface: `EsTupleMapper`

      Extracts index from tuple.

      Specified by:
        `getIndex` in interface `EsTupleMapper`
      Parameters:
        `tuple` - source tuple
      Returns:
        index

    - #### getType

          public String getType(ITuple tuple)

      Description copied from interface: `EsTupleMapper`

      Extracts type from tuple.

      Specified by:
        `getType` in interface `EsTupleMapper`
      Parameters:
        `tuple` - source tuple
      Returns:
        type

    - #### getId

          public String getId(ITuple tuple)

      Description copied from interface: `EsTupleMapper`

      Extracts id from tuple.

      Specified by:
        `getId` in interface `EsTupleMapper`
      Parameters:
        `tuple` - source tuple
      Returns:
        id

    - #### getParams

          public Map<String,String> getParams(ITuple tuple,
                                              Map<String,String> defaultValue)

      Description copied from interface: `EsTupleMapper`

      Extracts params from tuple if available.

      Specified by:
        `getParams` in interface `EsTupleMapper`
      Parameters:
        `tuple` - source tuple
        `defaultValue` - value to return if params are missing
      Returns:
        params

Copyright © 2021 The Apache Software Foundation. All rights reserved.