org.apache.storm.trident.windowing

## Class WindowTridentProcessor

- java.lang.Object
- - org.apache.storm.trident.windowing.WindowTridentProcessor

- All Implemented Interfaces:
    Serializable, TridentProcessor, TupleReceiver

      public class WindowTridentProcessor
      extends Object
      implements TridentProcessor

  `TridentProcessor` implementation for windowing operations on trident stream.

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WindowTridentProcessor.TriggerInfo`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT`
    `static String` | `TRIGGER_COUNT_PREFIX`
    `static String` | `TRIGGER_FIELD_NAME`
    `static String` | `TRIGGER_INPROCESS_PREFIX`
    `static String` | `TRIGGER_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WindowTridentProcessor(WindowConfig windowConfig, String uniqueWindowId, WindowsStoreFactory windowStoreFactory, Fields inputFields, Aggregator aggregator, boolean storeTuplesInStore)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanup()`
    `void` | `execute(ProcessorContext processorContext, String streamId, TridentTuple tuple)`
    `void` | `finishBatch(ProcessorContext processorContext)`
    `void` | `flush()`
    `static String` | `generateWindowTriggerKey(String windowTaskId, int triggerId)`
    `static Object` | `getBatchTxnId(Object batchId)`
    `TridentTuple.Factory` | `getOutputFactory()`
    `static String` | `getWindowTriggerInprocessIdPrefix(String windowTaskId)`
    `static String` | `getWindowTriggerTaskPrefix(String windowTaskId)`
    `void` | `prepare(Map<String,Object> topoConf, TopologyContext context, TridentContext tridentContext)`
    `void` | `startBatch(ProcessorContext processorContext)`
    `String` | `triggerKey(int triggerId)`

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

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

- - ### Field Detail

    - #### TRIGGER_INPROCESS_PREFIX

          public static final String TRIGGER_INPROCESS_PREFIX

      See Also:
        Constant Field Values

    - #### TRIGGER_PREFIX

          public static final String TRIGGER_PREFIX

      See Also:
        Constant Field Values

    - #### TRIGGER_COUNT_PREFIX

          public static final String TRIGGER_COUNT_PREFIX

      See Also:
        Constant Field Values

    - #### TRIGGER_FIELD_NAME

          public static final String TRIGGER_FIELD_NAME

      See Also:
        Constant Field Values

    - #### DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT

          public static final long DEFAULT_INMEMORY_TUPLE_CACHE_LIMIT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WindowTridentProcessor

          public WindowTridentProcessor(WindowConfig windowConfig,
                                        String uniqueWindowId,
                                        WindowsStoreFactory windowStoreFactory,
                                        Fields inputFields,
                                        Aggregator aggregator,
                                        boolean storeTuplesInStore)

  - ### Method Detail

    - #### getWindowTriggerInprocessIdPrefix

          public static String getWindowTriggerInprocessIdPrefix(String windowTaskId)

    - #### getWindowTriggerTaskPrefix

          public static String getWindowTriggerTaskPrefix(String windowTaskId)

    - #### getBatchTxnId

          public static Object getBatchTxnId(Object batchId)

    - #### generateWindowTriggerKey

          public static String generateWindowTriggerKey(String windowTaskId,
                                                        int triggerId)

    - #### prepare

          public void prepare(Map<String,Object> topoConf,
                              TopologyContext context,
                              TridentContext tridentContext)

      Specified by:
        `prepare` in interface `TridentProcessor`

    - #### cleanup

          public void cleanup()

      Specified by:
        `cleanup` in interface `TridentProcessor`

    - #### startBatch

          public void startBatch(ProcessorContext processorContext)

      Specified by:
        `startBatch` in interface `TridentProcessor`

    - #### execute

          public void execute(ProcessorContext processorContext,
                              String streamId,
                              TridentTuple tuple)

      Specified by:
        `execute` in interface `TupleReceiver`

    - #### flush

          public void flush()

      Specified by:
        `flush` in interface `TupleReceiver`

    - #### finishBatch

          public void finishBatch(ProcessorContext processorContext)

      Specified by:
        `finishBatch` in interface `TridentProcessor`

    - #### getOutputFactory

          public TridentTuple.Factory getOutputFactory()

      Specified by:
        `getOutputFactory` in interface `TridentProcessor`

    - #### triggerKey

          public String triggerKey(int triggerId)

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