public interface Operation extends Serializable
Parent interface for Trident
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.
void prepare(Map conf, TridentOperationContext context)
Called when the
Operation is first initialized.
conf- the Storm configuration map
context- 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.
When running in local mode, called when the local cluster is being shut down.
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.