You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Richards Peter <hb...@gmail.com> on 2014/01/07 12:50:16 UTC

Is it possible to find out the active supervisor nodes through a program?

Hi,

I would like to know whether we can find out the list of active storm
supervisor nodes? I checked the following class:

https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/generated/Nimbus.java

It has a method -> getClusterInfo():ClusterSummary


ClusterSummary internally has another method -> get_supervisors
():List<SupervisorSummary>

https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java

Will this be able to tell me the list of all active supervisors? I would
like to ignore the supervisors which are not active at the present. Is
there a better way to achieve the same?

Thanks,
Richards Peter.

Re: Is it possible to find out the active supervisor nodes through a program?

Posted by Richards Peter <hb...@gmail.com>.
Thanks Taylor,
Richards Peter.

Re: Is it possible to find out the active supervisor nodes through a program?

Posted by "P. Taylor Goetz" <pt...@gmail.com>.
Richards,

Yes, the Nimbus thrift interface provides an API for querying a Storm cluster, and is exactly what Storm UI uses to get the information it displays. 

As far as “active” supervisors, it depends on what you mean by “active”. If by active you mean “up and known to Nimbus” then the list returned by the thrift API should be enough, if you mean “has active worker processes” then you’ll have to do additional work (not much) to see if it has any used slots.

HTH

- Taylor


On Jan 7, 2014, at 3:50 AM, Richards Peter <hb...@gmail.com> wrote:

> Hi,
> 
> I would like to know whether we can find out the list of active storm supervisor nodes? I checked the following class:
> 
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/generated/Nimbus.java
> 
> It has a method -> getClusterInfo():ClusterSummary
> 
> 
> ClusterSummary internally has another method -> get_supervisors():List<SupervisorSummary>
> 
> https://github.com/apache/incubator-storm/blob/master/storm-core/src/jvm/backtype/storm/generated/SupervisorSummary.java
> 
> Will this be able to tell me the list of all active supervisors? I would like to ignore the supervisors which are not active at the present. Is there a better way to achieve the same?
> 
> Thanks,
> Richards Peter.