You cannot get CPU and Memory, but you can get the graph Structure.

Topologies has all of the TopologyDetails in it. Each TopologyDetails has
a StormTopology in it.  This is the same Thrift data structure that is
submitted to nimbus when a topology is to be run.

Adding access to the CPU/Memory information should not be too difficult.
Storm currently has two different metrics systems.  The one you care about
is written into ZK as part of the worker heartbeat.

https://github.com/apache/incubator-storm/blob/ab5e5096a1acb7f2df46acfcec32
caa4fa3e9af2/storm-core/src/clj/backtype/storm/daemon/worker.clj#L40-54

You could extend this to include CPU/Memory information.  Then in nimbus
you would want a way to expose those stats to the scheduler. I would
probably do it through TopologyDetails.

https://github.com/apache/incubator-storm/blob/22ddd6e6d5c78e36610366e71ea8
79b283575e01/storm-core/src/clj/backtype/storm/daemon/nimbus.clj#L327-340

You can pull the metrics out from (:heartbeats-cache nimbus).

―Bobby 

On 3/22/14, 11:49 PM, "James Xu" <[email protected]> wrote:

>Yeah, currently you can’t get these information from inside the scheduler.
>
>- James 
>
>On 2014年3月23日, at 上午9:54, hilfi alkaff <[email protected]> wrote:
>
>> Hi,
>> 
>> I am currently trying to develop a scheduler following
>> 
>>http://xumingming.sinaapp.com/885/twitter-storm-how-to-develop-a-pluggabl
>>e-scheduler/but
>> I could not find ways to get the aforementioned information from
>> inside
>> the scheduler. Is there anything that I miss?
>> 
>> Thanks
>> 
>> -- 
>> Hilfi M. Alkaff
>

Reply via email to