FetchDistributedMapCache

Description:

Computes a cache key from FlowFile attributes, for each incoming FlowFile, and fetches the value from the Distributed Map Cache associated with that key. The incoming FlowFile's content is replaced with the binary data received by the Distributed Map Cache. If there is no value stored under that key then the flow file will be routed to 'not-found'. Note that the processor will always attempt to read the entire cached value into memory before placing it in it's destination. This could be potentially problematic if the cached value is very large.

Tags:

map, cache, fetch, distributed

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

NameDefault ValueAllowable ValuesDescription
Cache Entry Identifier${hash.value}A FlowFile attribute, or the results of an Attribute Expression Language statement, which will be evaluated against a FlowFile in order to determine the value used to identify duplicates; it is this value that is cached
Supports Expression Language: true
Distributed Cache ServiceController Service API:
DistributedMapCacheClient
Implementations: DistributedMapCacheClientService
HBase_1_1_2_ClientMapCacheService
The Controller Service that is used to get the cached values.
Put Cache Value In AttributeIf set, the cache value received will be put into an attribute of the FlowFile instead of a the content of theFlowFile. The attribute key to put to is determined by evaluating value of this property.
Supports Expression Language: true
Max Length To Put In Attribute256If routing the cache value to an attribute of the FlowFile (by setting the "Put Cache Value in attribute" property), the number of characters put to the attribute value will be at most this amount. This is important because attributes are held in memory and large attributes will quickly cause out of memory issues. If the output goes longer than this value, it will be truncated to fit. Consider making this smaller if able.
Character SetUTF-8The Character Set in which the cached value is encoded. This will only be used when routing to an attribute.

Relationships:

NameDescription
successIf the cache was successfully communicated with it will be routed to this relationship
failureIf unable to communicate with the cache or if the cache entry is evaluated to be blank, the FlowFile will be penalized and routed to this relationship
not-foundIf a FlowFile's Cache Entry Identifier was not found in the cache, it will be routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
user-definedIf the 'Put Cache Value In Attribute' property is set then whatever it is set to will become the attribute key and the value would be whatever the response was from the Distributed Map Cache.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

See Also:

DistributedMapCacheClientService, DistributedMapCacheServer, PutDistributedMapCache