Package org.apache.heron.simulator
Class Simulator
- java.lang.Object
-
- org.apache.heron.simulator.Simulator
-
public class Simulator extends Object
One Simulator instance can only submit one topology. Please have multiple Simulator instances for multiple topologies.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSimulator.DefaultExceptionHandlerHandler for catching exceptions thrown by any threads (owned either by topology or heron infrastructure).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(String topologyName)voiddeactivate(String topologyName)protected org.apache.heron.common.config.SystemConfiggetSystemConfig()protected voidinit()protected booleanisSystemConfigExisted()Check if the system config is already registered into the SingleRegistryvoidkillTopology(String topologyName)protected voidregisterSystemConfig(org.apache.heron.common.config.SystemConfig sysConfig)Register the given system configvoidshutdown()voidstop()voidsubmitTopology(String name, org.apache.heron.api.Config heronConfig, org.apache.heron.api.HeronTopology heronTopology)Submit and run topology in simulator
-
-
-
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 nameheronConfig- topology configheronTopology- 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()
-
-