Search in sources :

Example 6 with SupervisorInfo

use of org.apache.storm.generated.SupervisorInfo in project storm by apache.

the class Nimbus method basicSupervisorDetailsMap.

private static Map<String, SupervisorDetails> basicSupervisorDetailsMap(IStormClusterState state) {
    Map<String, SupervisorDetails> ret = new HashMap<>();
    for (Entry<String, SupervisorInfo> entry : state.allSupervisorInfo().entrySet()) {
        String id = entry.getKey();
        SupervisorInfo info = entry.getValue();
        ret.put(id, new SupervisorDetails(id, info.get_hostname(), info.get_scheduler_meta(), null, info.get_resources_map()));
    }
    return ret;
}
Also used : HashMap(java.util.HashMap) SupervisorDetails(org.apache.storm.scheduler.SupervisorDetails) SupervisorInfo(org.apache.storm.generated.SupervisorInfo)

Aggregations

SupervisorInfo (org.apache.storm.generated.SupervisorInfo)6 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)3 IStormClusterState (org.apache.storm.cluster.IStormClusterState)3 HashSet (java.util.HashSet)2 List (java.util.List)2 AtomicLong (java.util.concurrent.atomic.AtomicLong)2 Assignment (org.apache.storm.generated.Assignment)2 SupervisorSummary (org.apache.storm.generated.SupervisorSummary)2 SchedulerAssignment (org.apache.storm.scheduler.SchedulerAssignment)2 SupervisorDetails (org.apache.storm.scheduler.SupervisorDetails)2 WorkerSlot (org.apache.storm.scheduler.WorkerSlot)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 IOException (java.io.IOException)1 InterruptedIOException (java.io.InterruptedIOException)1 BindException (java.net.BindException)1 Map (java.util.Map)1 Set (java.util.Set)1 AlreadyAliveException (org.apache.storm.generated.AlreadyAliveException)1 AuthorizationException (org.apache.storm.generated.AuthorizationException)1