GitHub user BuDongDong opened a pull request:

    https://github.com/apache/storm/pull/433

    Update "get-task-object" function, change the type of first param 
"topology" from ^TopologyContext to ^StormTopology

    Update "get-task-object" function, change the type of first param 
"topology" from ^TopologyContext to ^StormTopology. the "get-task-object" 
function in task.clj,the type of first param "topology" should be 
^StormTopology not ^TopologyContext.
    
    the "get-task-object" is called by "mk-task-data" function in task.clj, 
"mk-task-data" is defined as following:
    
    (defn mk-task-data [executor-data task-id]
      (recursive-map
        :executor-data executor-data
        :task-id task-id
        :system-context (system-topology-context (:worker executor-data) 
executor-data task-id)
        :user-context (user-topology-context (:worker executor-data) 
executor-data task-id)
        :builtin-metrics (builtin-metrics/make-data (:type executor-data))
        :tasks-fn (mk-tasks-fn <>)
        :object (get-task-object (.getRawTopology ^TopologyContext 
(:system-context <>)) (:component-id executor-data))))
    
    (:system-context <>) return TopologyContext instance, TopologyContext 
extends GeneralTopologyContext, the TopologyContext instance has StormTopology 
_topology. “getRawTopology” method of TopologyContext must return 
StormTopology _topology. (.getRawTopology ^TopologyContext (:system-context <>) 
return StormTopology instance not TopologyContext instance. so the type of 
param topology is StormTopology not TopologyContext.
    
    at the same time, "get-task-object" call "get_spouts" and "get_bolts" of 
the param topology. you can find the "get_spouts" and "get_bolts" function are 
only defined in StormTopology, and StormTopology is not a subclass of 
TopologyContext. so i think the type of param topology is StormTopology not 
TopologyContext.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BuDongDong/storm master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/433.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #433
    
----
commit 0ee865750e8d54c00d2abac81c20c429483bc646
Author: zhangjinlong <[email protected]>
Date:   2015-02-16T05:49:06Z

    Update "get-task-object" function in task.clj
    
    Update "get-task-object" function, change the type of first param 
"topology" from ^TopologyContext to ^StormTopology. the "get-task-object" 
function in task.clj,the type of first param "topology" should be 
^StormTopology not ^TopologyContext.
    
    the "get-task-object" is called by "mk-task-data" function in task.clj, 
"mk-task-data" is defined as following:
    
    (defn mk-task-data [executor-data task-id]
      (recursive-map
        :executor-data executor-data
        :task-id task-id
        :system-context (system-topology-context (:worker executor-data) 
executor-data task-id)
        :user-context (user-topology-context (:worker executor-data) 
executor-data task-id)
        :builtin-metrics (builtin-metrics/make-data (:type executor-data))
        :tasks-fn (mk-tasks-fn <>)
        :object (get-task-object (.getRawTopology ^TopologyContext 
(:system-context <>)) (:component-id executor-data))))
    
    (:system-context <>) return TopologyContext instance, TopologyContext 
extends GeneralTopologyContext, the TopologyContext instance has StormTopology 
_topology. “getRawTopology” method of TopologyContext must return 
StormTopology _topology. (.getRawTopology ^TopologyContext (:system-context <>) 
return StormTopology instance not TopologyContext instance. so the type of 
param topology is StormTopology not TopologyContext.
    
    at the same time, "get-task-object" call "get_spouts" and "get_bolts" of 
the param topology. you can find the "get_spouts" and "get_bolts" function are 
only defined in StormTopology, and StormTopology is not a subclass of 
TopologyContext. so i think the type of param topology is StormTopology not 
TopologyContext.

----


---
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.
---

Reply via email to