Package com.here.platform.dal.custom
Interface UDF
- All Known Subinterfaces:
MultiKeysUDF
,SimpleUDF
,SplittedUDF
public interface UDF
The user of this interface has precise control over how their data is archived in index layer.
The interface provides two methods for aggregating and merging the data that has same indexing attributes.
Note that this is the base interface. The user should implement one of SimpleUDF
, MultiKeysUDF
, SplittedUDF
which
extends this base interface.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Aggregates all messages in user defined format and returns an array of bytes.default void
open
(org.apache.flink.configuration.Configuration parameters, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) Initialization method which is called before the actual working methods (like getKeys/aggregate) and thus suitable for one time setup work.default byte[]
transformForDeadLetter
(byte[] message) Transforms message in user defined format and returns an array of bytes.
-
Method Details
-
aggregate
Aggregates all messages in user defined format and returns an array of bytes.These bytes will be archived in blob-store and corresponding indexing attributes with additional metadata will be available in index layer for querying.
- Parameters:
keys
- collection containing shared indexing attributes for group of messages to be archivedmessages
- collection containing messages to be aggregated for archival process- Returns:
- the resultant byte array to be archived to blob-store
-
transformForDeadLetter
default byte[] transformForDeadLetter(byte[] message) Transforms message in user defined format and returns an array of bytes.All bytes will be archived in blob-store and corresponding metadata will be available in deadletter index layer for querying.
- Parameters:
message
- byte array representing original message- Returns:
- the resultant byte array after transformation to be archived to blob-store
- Since:
- 0.1.133
-
open
default void open(org.apache.flink.configuration.Configuration parameters, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) Initialization method which is called before the actual working methods (like getKeys/aggregate) and thus suitable for one time setup work. By default, this method is a no-op.- Parameters:
parameters
- The configuration object passed to the function can be used for configuration and initialization. The configuration contains all parameters that were configured on the function in the program composition.runtimeContext
- A RuntimeContext contains information about the context in which functions are executed. Each parallel instance of the function will have a context through which it can access static contextual information (such as the current parallelism) and other constructs like accumulators and broadcast variables. It can be used to create and register user defined metrics on a MetricGroup object obtained from a RuntimeContext.- Since:
- 0.1.267
-