SPL File DpsPutTTLWithReconnect.spl

Streams DPS Toolkit > com.ibm.streamsx.dps 4.1.8 > com.ibm.streamsx.store.distributed > DpsPutTTLWithReconnect.spl

Content

Operators
  • DpsPutTTLWithReconnect: DpsPutTTLWithReconnect Uses the dpsPutTTL function to write key-value pairs to Redis (of any type).

Composites

composite DpsPutTTLWithReconnect(output Out; input In)

DpsPutTTLWithReconnect Uses the dpsPutTTL function to write key-value pairs to Redis (of any type). The purpose of this composite is to provide extensive error handling, a reconnection policy, and a complete set of informative metrics.

By default, keys and values are not encoded in order to provide maximum ease of access via non-Streams methods. If non-String types are provided for either the key or value, they will automatically be encoded. Use the Base64 encoding options to save space.

Note: The following metrics are only valid once we have established an initial connection to the DPS server. Before that connection, we will throw exceptions (without failure) and the isConnected metric will be valid. All other metrics will be unusable until first-connection is established.

Longterm and Current Metrics:
  • isConnected Maintains a metric of if we think we are connected to Redis or not.
  • totalInserts Maintains a metric of the number of total inserts done since startup.
  • totalFailedInserts Maintains a metric of the number of failed inserts since startup.
  • totalReconnections Maintains a metric of the number of reconnections to the DPS Server since startup.

Interval Metrics:

  • numInserts Maintains a metric of the number inserts completed in the last interval of time.
  • numFailedInserts Maintains a metric of the number of failed inserts done.
  • numUniqueKeyInserts Maintains a metric of the number of unique keys inserted in the last interval of time.
  • reconnectionAttptsSinceDisconnect Maintains a metric of the number of reconnection attempts in the last interval of time.
  • avgTTLMinutes Maintains a metric of the average TTL in minutes over the last interval of time.
  • avgKeyValueSizeBytes Maintains a metric of the average key-value size in the last interval of time. The size is the amount of space utilized after any encoding by the DPS toolkit. Failed inserts contribute a value of 0 to the avgKeyValueSize, skewing the results downwards.
  • maxKeyValueSizeBytes Maintains a metric of the max key-value size in the last interval of time. The size is the amount of space utilized after any encoding by the DPS toolkit.

This operator forwards punctuation.

Parameters

Input Ports

Output Ports