public class MqttPublishFunction extends BaseFunction
Constructor and Description |
---|
MqttPublishFunction(MqttOptions options,
MqttTupleMapper mapper,
KeyStoreLoader keyStoreLoader,
boolean retain) |
Modifier and Type | Method and Description |
---|---|
void |
execute(TridentTuple tuple,
TridentCollector collector)
Performs the function logic on an individual tuple and emits 0 or more tuples.
|
void |
prepare(Map conf,
TridentOperationContext context)
No-op implementation.
|
cleanup
public MqttPublishFunction(MqttOptions options, MqttTupleMapper mapper, KeyStoreLoader keyStoreLoader, boolean retain)
public void prepare(Map conf, TridentOperationContext context)
BaseOperation
No-op implementation.
prepare
in interface Operation
prepare
in class BaseOperation
conf
- the Storm configuration mapcontext
- the operation context which provides information such as the number of partitions in the stream, and the current partition index. It also provides methods for registering operation-specific metrics.TridentOperationContext
public void execute(TridentTuple tuple, TridentCollector collector)
Function
Performs the function logic on an individual tuple and emits 0 or more tuples.
tuple
- The incoming tuplecollector
- A collector instance that can be used to emit tuplesCopyright © 2019 The Apache Software Foundation. All Rights Reserved.