[ 
https://issues.apache.org/jira/browse/STORM-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15109006#comment-15109006
 ] 

ASF GitHub Bot commented on STORM-1214:
---------------------------------------

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.


> Trident API Improvements
> ------------------------
>
>                 Key: STORM-1214
>                 URL: https://issues.apache.org/jira/browse/STORM-1214
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: P. Taylor Goetz
>            Assignee: P. Taylor Goetz
>
> There are a few idiosyncrasies in the Trident API that can sometimes trip 
> developers up (e.g. when and how to set the parallelism of components). There 
> are also a few areas where the API could be made slightly more intuitive 
> (e.g. add Java 8 streams-like methods like {{filter()}}, {{map()}}, 
> {{flatMap()}}, etc.).
> Some of these concerns can be addressed through documentation, and some by 
> altering the API. Since we are approaching a 1.0 release, it would be good to 
> address any API changes before a major release.
> The goal of this JIRA is to identify specific areas of improvement and 
> formulate an implementation that addresses them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to