public class LocalFileSystemStateManager extends FileSystemStateManager
rootAddress
Constructor and Description |
---|
LocalFileSystemStateManager() |
Modifier and Type | Method and Description |
---|---|
void |
close()
This is to for disposing or cleaning up any internal state accumulated by
the StateManager
|
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteData(java.lang.String path) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteExecutionState(java.lang.String topologyName)
Delete the execution state for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deletePhysicalPlan(java.lang.String topologyName)
Delete the physical plan for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteSchedulerLocation(java.lang.String topologyName)
Delete the scheduler location for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteTMasterLocation(java.lang.String topologyName)
Delete the tmaster location for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteTopology(java.lang.String topologyName)
Delete the topology definition for the given topology
|
protected <M extends com.google.protobuf.Message> |
getData(java.lang.String path,
com.google.protobuf.Message.Builder builder) |
com.google.common.util.concurrent.ListenableFuture<ExecutionEnvironment.ExecutionState> |
getExecutionState(WatchCallback watcher,
java.lang.String topologyName)
Get the execution state for the given topology
|
com.google.common.util.concurrent.ListenableFuture<PhysicalPlans.PhysicalPlan> |
getPhysicalPlan(WatchCallback watcher,
java.lang.String topologyName)
Get the physical plan for the given topology
|
com.google.common.util.concurrent.ListenableFuture<Scheduler.SchedulerLocation> |
getSchedulerLocation(WatchCallback watcher,
java.lang.String topologyName)
Get the scheduler location for the given topology
|
com.google.common.util.concurrent.ListenableFuture<TopologyMaster.TMasterLocation> |
getTMasterLocation(WatchCallback watcher,
java.lang.String topologyName)
Get the tmaster location for the given topology
|
com.google.common.util.concurrent.ListenableFuture<TopologyAPI.Topology> |
getTopology(WatchCallback watcher,
java.lang.String topologyName)
Get the topology definition for the given topology
|
void |
initialize(Config ipconfig)
Initialize StateManager with the incoming context.
|
protected boolean |
initTree() |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
isTopologyRunning(java.lang.String topologyName)
Is the given topology in RUNNING state?
|
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setData(java.lang.String path,
byte[] data,
boolean overwrite) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setExecutionState(ExecutionEnvironment.ExecutionState executionState,
java.lang.String topologyName)
Set the execution state for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setPhysicalPlan(PhysicalPlans.PhysicalPlan physicalPlan,
java.lang.String topologyName)
Set the physical plan for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setSchedulerLocation(Scheduler.SchedulerLocation location,
java.lang.String topologyName)
Set the scheduler location for the given topology
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setTMasterLocation(TopologyMaster.TMasterLocation location,
java.lang.String topologyName)
Set the location of Tmaster.
|
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
setTopology(TopologyAPI.Topology topology,
java.lang.String topologyName)
Set the topology definition for the given topology
|
getExecutionStateDir, getExecutionStatePath, getPhysicalPlanDir, getPhysicalPlanPath, getSchedulerLocationDir, getSchedulerLocationPath, getTMasterLocationDir, getTMasterLocationPath, getTopologyDir, getTopologyPath
public void initialize(Config ipconfig)
IStateManager
initialize
in interface IStateManager
initialize
in class FileSystemStateManager
protected boolean initTree()
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setData(java.lang.String path, byte[] data, boolean overwrite)
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteData(java.lang.String path)
protected <M extends com.google.protobuf.Message> com.google.common.util.concurrent.ListenableFuture<M> getData(java.lang.String path, com.google.protobuf.Message.Builder builder)
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setExecutionState(ExecutionEnvironment.ExecutionState executionState, java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setTMasterLocation(TopologyMaster.TMasterLocation location, java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setTopology(TopologyAPI.Topology topology, java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setPhysicalPlan(PhysicalPlans.PhysicalPlan physicalPlan, java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> setSchedulerLocation(Scheduler.SchedulerLocation location, java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteTMasterLocation(java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteSchedulerLocation(java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteExecutionState(java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteTopology(java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deletePhysicalPlan(java.lang.String topologyName)
IStateManager
public com.google.common.util.concurrent.ListenableFuture<Scheduler.SchedulerLocation> getSchedulerLocation(WatchCallback watcher, java.lang.String topologyName)
IStateManager
watcher
- @see com.twitter.heron.spi.statemgr.WatchCallbackpublic com.google.common.util.concurrent.ListenableFuture<TopologyAPI.Topology> getTopology(WatchCallback watcher, java.lang.String topologyName)
IStateManager
watcher
- @see com.twitter.heron.spi.statemgr.WatchCallbackpublic com.google.common.util.concurrent.ListenableFuture<ExecutionEnvironment.ExecutionState> getExecutionState(WatchCallback watcher, java.lang.String topologyName)
IStateManager
watcher
- @see com.twitter.heron.spi.statemgr.WatchCallbackpublic com.google.common.util.concurrent.ListenableFuture<PhysicalPlans.PhysicalPlan> getPhysicalPlan(WatchCallback watcher, java.lang.String topologyName)
IStateManager
watcher
- @see com.twitter.heron.spi.statemgr.WatchCallbackpublic com.google.common.util.concurrent.ListenableFuture<TopologyMaster.TMasterLocation> getTMasterLocation(WatchCallback watcher, java.lang.String topologyName)
IStateManager
watcher
- @see com.twitter.heron.spi.statemgr.WatchCallbackpublic com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> isTopologyRunning(java.lang.String topologyName)
IStateManager
public void close()
IStateManager
Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.