private static TopologyAPI . TopologyState getRuntimeTopologyState ( String topologyName , SchedulerStateManagerAdaptor statemgr ) throws TMasterException { PhysicalPlans . PhysicalPlan plan = statemgr . getPhysicalPlan ( topologyName ) ; if ( plan == null ) { throw new TMasterException ( String . format ( "Failed to get physical plan for topology '%s'" , topologyName ) ) ; } return plan . getTopology ( ) . getState ( ) ; }
Get current running TopologyState