Class Simulator


  • public class Simulator
    extends Object
    One Simulator instance can only submit one topology. Please have multiple Simulator instances for multiple topologies.
    • Constructor Detail

      • Simulator

        public Simulator()
      • Simulator

        public Simulator​(boolean initialize)
    • Method Detail

      • init

        protected void init()
      • isSystemConfigExisted

        protected boolean isSystemConfigExisted()
        Check if the system config is already registered into the SingleRegistry
        Returns:
        true if it's registered; false otherwise
      • registerSystemConfig

        protected void registerSystemConfig​(org.apache.heron.common.config.SystemConfig sysConfig)
        Register the given system config
      • submitTopology

        public void submitTopology​(String name,
                                   org.apache.heron.api.Config heronConfig,
                                   org.apache.heron.api.HeronTopology heronTopology)
        Submit and run topology in simulator
        Parameters:
        name - topology name
        heronConfig - topology config
        heronTopology - topology built from topology builder
      • killTopology

        public void killTopology​(String topologyName)
      • activate

        public void activate​(String topologyName)
      • deactivate

        public void deactivate​(String topologyName)
      • shutdown

        public void shutdown()
      • stop

        public void stop()
      • getSystemConfig

        protected org.apache.heron.common.config.SystemConfig getSystemConfig()