Skip to main content

PutDistributedMapCache

Description

Gets the content of a FlowFile and puts it to a distributed map cache, using a cache key computed from FlowFile attributes. If the cache already contains the entry and the cache update strategy is 'keep original' the entry is not replaced.'

Tags

cache, distributed, map, put

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Cache Entry Identifier *Cache Entry IdentifierA FlowFile attribute, or the results of an Attribute Expression Language statement, which will be evaluated against a FlowFile in order to determine the cache key

Supports Expression Language, using FlowFile attributes and Environment variables.
Distributed Cache Service *Distributed Cache ServiceController Service:
DistributedMapCacheClient

Implementations:
HazelcastMapCacheClient
MapCacheClientService
RedisDistributedMapCacheClientService
SimpleRedisDistributedMapCacheClientService
The Controller Service that is used to cache flow files
Cache update strategy *Cache update strategyReplace if present
  • Replace if present
  • Keep original
Determines how the cache is updated if the cache already contains the entry
Max cache entry sizeMax cache entry size1 MBThe maximum amount of data to put into cache

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureAny FlowFile that cannot be inserted into the cache will be routed to this relationship
successAny FlowFile that is successfully inserted into cache will be routed to this relationship

Reads Attributes

This processor does not read attributes.

Writes Attributes

NameDescription
cachedAll FlowFiles will have an attribute 'cached'. The value of this attribute is true, is the FlowFile is cached, otherwise false.

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also

DistributedMapCacheClientService, DistributedMapCacheServer, FetchDistributedMapCache