public interface Operation extends Serializable
Parent interface for Trident Filter
s and Function
s.
Operation
defines two lifecycle methods for Trident components. The prepare()
method is called once when the Operation
is first initialized. The cleanup()
method is called in local mode when the local cluster is being shut down. In distributed mode, the cleanup()
method is not guaranteed to be called in every situation, but Storm will make a best effort call cleanup()
whenever possible.
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
When running in local mode, called when the local cluster is being shut down.
|
void |
prepare(Map conf,
TridentOperationContext context)
Called when the
Operation is first initialized. |
void prepare(Map conf, TridentOperationContext context)
Called when the Operation
is first initialized.
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
void cleanup()
When running in local mode, called when the local cluster is being shut down.
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.