Class AddElementsFromKafkaHandler
- java.lang.Object
-
- uk.gov.gchq.gaffer.flink.operation.handler.AddElementsFromKafkaHandler
-
- All Implemented Interfaces:
OperationHandler<AddElementsFromKafka>
public class AddElementsFromKafkaHandler extends Object implements OperationHandler<AddElementsFromKafka>
A
AddElementsFromKafkaHandler
handles theAddElementsFromKafka
operation.This uses Flink to stream the
Element
objects from a Kafka queue into Gaffer.Rebalancing can be skipped by setting the operation option: gaffer.flink.operation.handler.skip-rebalancing to true
-
-
Constructor Summary
Constructors Constructor Description AddElementsFromKafkaHandler()
AddElementsFromKafkaHandler(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, org.apache.flink.streaming.api.functions.sink.SinkFunction<Element> sink)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doOperation(AddElementsFromKafka op, Context context, Store store)
Execute the givenOperation
.
-
-
-
Constructor Detail
-
AddElementsFromKafkaHandler
public AddElementsFromKafkaHandler()
-
AddElementsFromKafkaHandler
public AddElementsFromKafkaHandler(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment env, org.apache.flink.streaming.api.functions.sink.SinkFunction<Element> sink)
-
-
Method Detail
-
doOperation
public Object doOperation(AddElementsFromKafka op, Context context, Store store) throws OperationException
Description copied from interface:OperationHandler
Execute the givenOperation
.- Specified by:
doOperation
in interfaceOperationHandler<AddElementsFromKafka>
- Parameters:
op
- theOperation
to be executedcontext
- the operation chain context, containing the user who executed the operationstore
- theStore
the operation should be run on- Returns:
- the output for the operation or null.
- Throws:
OperationException
- thrown if the operation fails
-
-