Github user ptgoetz commented on a diff in the pull request:
https://github.com/apache/storm/pull/1029#discussion_r50288291
--- Diff:
storm-core/src/jvm/org/apache/storm/trident/operation/Operation.java ---
@@ -20,7 +20,26 @@
import java.io.Serializable;
import java.util.Map;
+/**
+ * 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.
+ */
public interface Operation extends Serializable {
+ /**
+ * Called when the `Operation` is first initialized.
+ * @param conf the Storm configuration map
+ * @param 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.
+ * @see storm.trident.operation.TridentOperationContext
+ */
void prepare(Map conf, TridentOperationContext context);
+
+ /**
+ * When running in local mode, called when the local cluster is being
shut down.
--- End diff --
Good catch. I'll fix this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---