public class CuratorStateManager extends FileSystemStateManager
rootAddress
Constructor and Description |
---|
CuratorStateManager() |
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> |
createNode(java.lang.String path,
byte[] data,
boolean isEphemeral) |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteExecutionState(java.lang.String topologyName)
Delete the execution state for the given topology
|
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
deleteNode(java.lang.String path) |
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 com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
existNode(java.lang.String path) |
java.lang.String |
getConnectionString() |
protected org.apache.curator.framework.CuratorFramework |
getCuratorClient() |
com.google.common.util.concurrent.ListenableFuture<ExecutionEnvironment.ExecutionState> |
getExecutionState(WatchCallback watcher,
java.lang.String topologyName)
Get the execution state for the given topology
|
protected <M extends com.google.protobuf.Message> |
getNodeData(WatchCallback watcher,
java.lang.String path,
com.google.protobuf.Message.Builder builder) |
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 newConfig)
Initialize StateManager with the incoming context.
|
protected void |
initTree() |
com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> |
isTopologyRunning(java.lang.String topologyName)
Is the given topology in RUNNING state?
|
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
|
protected Pair<java.lang.String,java.util.List<java.lang.Process>> |
setupZkTunnel() |
getExecutionStateDir, getExecutionStatePath, getPhysicalPlanDir, getPhysicalPlanPath, getSchedulerLocationDir, getSchedulerLocationPath, getTMasterLocationDir, getTMasterLocationPath, getTopologyDir, getTopologyPath
public void initialize(Config newConfig)
IStateManager
initialize
in interface IStateManager
initialize
in class FileSystemStateManager
protected org.apache.curator.framework.CuratorFramework getCuratorClient()
protected Pair<java.lang.String,java.util.List<java.lang.Process>> setupZkTunnel()
protected void initTree()
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.
public java.lang.String getConnectionString()
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> existNode(java.lang.String path)
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> createNode(java.lang.String path, byte[] data, boolean isEphemeral)
protected com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> deleteNode(java.lang.String path)
protected <M extends com.google.protobuf.Message> com.google.common.util.concurrent.ListenableFuture<M> getNodeData(WatchCallback watcher, java.lang.String path, com.google.protobuf.Message.Builder builder)
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> setExecutionState(ExecutionEnvironment.ExecutionState executionState, 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> 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<java.lang.Boolean> deleteSchedulerLocation(java.lang.String topologyName)
IStateManager
public 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<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<java.lang.Boolean> isTopologyRunning(java.lang.String topologyName)
IStateManager