Github user BuDongDong commented on the pull request:
https://github.com/apache/storm/pull/312#issuecomment-63206771
@harshach 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.
---