Package com.here.platform.dal.custom
Interface MultiKeysUDF
- All Superinterfaces:
UDF
The user of this interface has precise control over selecting indexing attributes with multiple values for each message.
- Since:
- 0.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetMultipleKeys
(Map<MetadataName, String> metadata, byte[] message) The purpose of this method is similar toSimpleUDF.getKeys(Map, byte[])
with following differences.Methods inherited from interface com.here.platform.dal.custom.UDF
aggregate, open, transformForDeadLetter
-
Method Details
-
getMultipleKeys
The purpose of this method is similar toSimpleUDF.getKeys(Map, byte[])
with following differences.For this method,
- The names of keys has to match the names of indexing attributes defined when creating index layer.
- User can select one or more values for each key. An individual value (value inside the
List
) cannot be aCollection
. - An individual value type inside the collection (
List
) of values for each key should be one of index layer supported types [Integer
,Long
,Boolean
,String
, timewindow (Long
), heretile (Long
)]. - If a collection or an index layer incompatible type is selected for an individual value type inside the value (
List
) of any valid key name, then the message will not be archived. - If an unchecked exception or null is returned, then the message will not be archived.
Note that in Data Archiving Library (DAL), the keys are flattened based on combination of individual values of different keys before archiving the message.
Therefore, having multiple values for the key will result in archiving duplicate messages. The number of combinations is directly proportional to the number of duplicate messages to be archived.
- Parameters:
metadata
- collection (Map
) containing metadata information. Any metadata information can also be used to select one/more indexing attributes for the message. The keys of the metadata map can be found hereMetadataName
.message
- message for which indexing attributes are supposed to be selected. The message is array of bytes which can also be deserialized to retrieve any specific characteristic for indexing.- Returns:
- the collection (
Map
) containing indexing attributes for the message.
-