Package org.apache.storm
Class LocalCluster
java.lang.Object
org.apache.storm.LocalCluster
- All Implemented Interfaces:
AutoCloseable
,Nimbus.Iface
,ILocalCluster
,ILocalClusterTrackedTopologyAware
A stand alone storm cluster that runs inside a single process. It is intended to be used for testing. Both internal testing for Apache
Storm itself and for people building storm topologies.
LocalCluster is an AutoCloseable so if you are using it in tests you can use a try block to be sure it is shut down.
try (LocalCluster cluster = new LocalCluster()) { // Do some tests } // The cluster has been shut down.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Simple way to configure a LocalCluster to meet your needs.class
When running a topology locally, for tests etc.Nested classes/interfaces inherited from interface org.apache.storm.ILocalCluster
ILocalCluster.ILocalTopology
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a default LocalCluster.LocalCluster
(String zkHost, Long zkPort) Create a LocalCluster that connects to an existing Zookeeper instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Activate a topology.Add another supervisor to the topology.addSupervisor
(Number ports) Add another supervisor to the topology.addSupervisor
(Number ports, String id) Add another supervisor to the topology.Add another supervisor to the topology.void
advanceClusterTime
(int secs) Advance the cluster time when the cluster is using SimulatedTime.void
advanceClusterTime
(int secs, int incSecs) Advance the cluster time when the cluster is using SimulatedTime.beginBlobDownload
(String key) beginCreateBlob
(String key, SettableBlobMeta meta) beginUpdateBlob
(String key) void
cancelBlobUpload
(String session) void
close()
void
void
deactivate
(String topologyName) Deactivate a topology.void
Enable/disable logging the tuples generated in topology via an internal EventLogger bolt.void
deleteBlob
(String key) downloadBlobChunk
(String session) downloadChunk
(String id) void
finishBlobUpload
(String session) void
finishFileUpload
(String location) getBlobMeta
(String key) int
getBlobReplication
(String key) Get cluster information.This is intended for internal testing only.getComponentPageInfo
(String topologyId, String componentId, String window, boolean isIncludeSys) getComponentPendingProfileActions
(String id, String componentId, ProfileAction action) Get daemon configuration.getLogConfig
(String name) Reference to metrics registry.Reference to nimbus.getOwnerResourceSummaries
(String owner) getSupervisor
(String id) Get a specific Supervisor.Get assigned assignments for a specific supervisorgetSupervisorPageInfo
(String id, String host, boolean isIncludeSys) int
getTopology
(String id) Get the compiled storm topology.The config of a topology as a JSON string.getTopologyHistory
(String user) Get the state of a topology.getTopologyInfoByName
(String name) Get the state of a topology.getTopologyInfoByNameWithOpts
(String name, GetInfoOptions options) Get the state of a topology.getTopologyInfoWithOpts
(String id, GetInfoOptions options) Get the state of a topology.getTopologyPageInfo
(String id, String window, boolean isIncludeSys) If the cluster is tracked get the id for the tracked cluster.Returns the user specified topology as submitted originally.boolean
isRemoteBlobExists
(String blobKey) Decide if the blob is removed from cluster.boolean
isTopologyNameAllowed
(String name) void
killSupervisor
(String id) Kill a specific supervisor.void
killTopology
(String topologyName) Kill a topology (if you are not using ILocalTopology).void
killTopologyWithOpts
(String name, KillOptions options) Kill a topology (if you are not using ILocalTopology).static void
Main entry point to running in local mode.void
processWorkerMetrics
(WorkerMetrics metrics) void
rebalance
(String name, RebalanceOptions options) Rebalance a topology.void
Send supervisor local worker heartbeat when a supervisor is unreachablevoid
Send supervisor worker heartbeats for a specific supervisorvoid
setBlobMeta
(String key, SettableBlobMeta meta) void
setLogConfig
(String name, LogConfig config) void
setWorkerProfiler
(String id, ProfileRequest profileRequest) void
shutdown()
Shut down the cluster.void
submitTopology
(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) submitTopology
(String topologyName, Map<String, Object> conf, StormTopology topology) Submit a topology to be run in local mode.submitTopology
(String topologyName, Map<String, Object> conf, TrackedTopology topology) Submit a tracked topology to be run in local mode.void
submitTopologyWithOpts
(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) submitTopologyWithOpts
(String topologyName, Map<String, Object> conf, StormTopology topology, SubmitOptions submitOpts) Submit a topology to be run in local mode.submitTopologyWithOpts
(String topologyName, Map<String, Object> conf, TrackedTopology topology, SubmitOptions submitOpts) Submit a tracked topology to be run in local mode.int
updateBlobReplication
(String key, int replication) void
uploadBlobChunk
(String session, ByteBuffer chunk) void
uploadChunk
(String location, ByteBuffer chunk) void
uploadNewCredentials
(String topologyName, Credentials creds) Upload new credentials to a topology.void
Wait for the cluster to be idle.void
waitForIdle
(long timeoutMs) Wait for the cluster to be idle.static <T> T
withLocalModeOverride
(Callable<T> c, long ttlSec) Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.static <T> T
withLocalModeOverride
(Callable<T> c, long ttlSec, Map<String, Object> daemonConf) Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.
-
Field Details
-
KILL_NOW
-
-
Constructor Details
-
Method Details
-
withLocalModeOverride
Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls. NOTE local mode override happens by default now unless netty is turned on for the local cluster.- Parameters:
c
- the callable to run in this modettlSec
- the number of seconds to let the cluster run after c has completed- Returns:
- the result of calling C
- Throws:
Exception
- on any Exception.
-
withLocalModeOverride
public static <T> T withLocalModeOverride(Callable<T> c, long ttlSec, Map<String, Object> daemonConf) throws ExceptionRun c with a local mode cluster overriding the NimbusClient and DRPCClient calls. NOTE local mode override happens by default now unless netty is turned on for the local cluster.- Parameters:
c
- the callable to run in this modettlSec
- the number of seconds to let the cluster run after c has completeddaemonConf
- configs to set for the daemon processes.- Returns:
- the result of calling C
- Throws:
Exception
- on any Exception.
-
main
Main entry point to running in local mode.- Parameters:
args
- arguments to be run in local mode- Throws:
Exception
- on any error when running.
-
getNimbus
Reference to nimbus.- Returns:
- Nimbus itself so you can interact with it directly, if needed.
-
getMetricRegistry
Reference to metrics registry.- Returns:
- The metrics registry for the local cluster.
-
getDaemonConf
Get daemon configuration.- Returns:
- the base config for the daemons
-
submitTopology
public LocalCluster.LocalTopology submitTopology(String topologyName, Map<String, Object> conf, StormTopology topology) throws org.apache.storm.thrift.TExceptionDescription copied from interface:ILocalCluster
Submit a topology to be run in local mode.- Specified by:
submitTopology
in interfaceILocalCluster
- Parameters:
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
submitTopology
public LocalCluster.LocalTopology submitTopology(String topologyName, Map<String, Object> conf, TrackedTopology topology) throws org.apache.storm.thrift.TExceptionDescription copied from interface:ILocalClusterTrackedTopologyAware
Submit a tracked topology to be run in local mode.- Specified by:
submitTopology
in interfaceILocalClusterTrackedTopologyAware
- Parameters:
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
submitTopology
public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException - Specified by:
submitTopology
in interfaceNimbus.Iface
- Throws:
AlreadyAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
-
submitTopologyWithOpts
public LocalCluster.LocalTopology submitTopologyWithOpts(String topologyName, Map<String, Object> conf, StormTopology topology, SubmitOptions submitOpts) throws org.apache.storm.thrift.TExceptionDescription copied from interface:ILocalCluster
Submit a topology to be run in local mode.- Specified by:
submitTopologyWithOpts
in interfaceILocalCluster
- Parameters:
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.submitOpts
- options for topology- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
submitTopologyWithOpts
public LocalCluster.LocalTopology submitTopologyWithOpts(String topologyName, Map<String, Object> conf, TrackedTopology topology, SubmitOptions submitOpts) throws org.apache.storm.thrift.TExceptionDescription copied from interface:ILocalClusterTrackedTopologyAware
Submit a tracked topology to be run in local mode.- Specified by:
submitTopologyWithOpts
in interfaceILocalClusterTrackedTopologyAware
- Parameters:
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.submitOpts
- options for topology- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
submitTopologyWithOpts
public void submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException - Specified by:
submitTopologyWithOpts
in interfaceNimbus.Iface
- Throws:
AlreadyAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
-
uploadNewCredentials
public void uploadNewCredentials(String topologyName, Credentials creds) throws org.apache.storm.thrift.TException Description copied from interface:ILocalCluster
Upload new credentials to a topology.- Specified by:
uploadNewCredentials
in interfaceILocalCluster
- Specified by:
uploadNewCredentials
in interfaceNimbus.Iface
- Parameters:
topologyName
- the name of the topologycreds
- the new credentails for the topology.- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
killTopology
Description copied from interface:ILocalCluster
Kill a topology (if you are not using ILocalTopology).- Specified by:
killTopology
in interfaceILocalCluster
- Specified by:
killTopology
in interfaceNimbus.Iface
- Parameters:
topologyName
- the name of the topology- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
killTopologyWithOpts
public void killTopologyWithOpts(String name, KillOptions options) throws org.apache.storm.thrift.TException Description copied from interface:ILocalCluster
Kill a topology (if you are not using ILocalTopology).- Specified by:
killTopologyWithOpts
in interfaceILocalCluster
- Specified by:
killTopologyWithOpts
in interfaceNimbus.Iface
- Parameters:
name
- the name of the topologyoptions
- for how to kill the topology- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
activate
Description copied from interface:ILocalCluster
Activate a topology.- Specified by:
activate
in interfaceILocalCluster
- Specified by:
activate
in interfaceNimbus.Iface
- Parameters:
topologyName
- the name of the topology to activate- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
deactivate
Description copied from interface:ILocalCluster
Deactivate a topology.- Specified by:
deactivate
in interfaceILocalCluster
- Specified by:
deactivate
in interfaceNimbus.Iface
- Parameters:
topologyName
- the name of the topology to deactivate- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
rebalance
public void rebalance(String name, RebalanceOptions options) throws org.apache.storm.thrift.TException Description copied from interface:ILocalCluster
Rebalance a topology.- Specified by:
rebalance
in interfaceILocalCluster
- Specified by:
rebalance
in interfaceNimbus.Iface
- Parameters:
name
- the name of the topologyoptions
- options for rebalanceing the topology.- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
shutdown
public void shutdown()Description copied from interface:ILocalCluster
Shut down the cluster.- Specified by:
shutdown
in interfaceILocalCluster
-
getTopologyConf
Description copied from interface:ILocalCluster
The config of a topology as a JSON string.- Specified by:
getTopologyConf
in interfaceILocalCluster
- Specified by:
getTopologyConf
in interfaceNimbus.Iface
- Parameters:
id
- the id of the topology (not the name)- Returns:
- The config of a topology as a JSON string
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getTopology
Description copied from interface:ILocalCluster
Get the compiled storm topology.- Specified by:
getTopology
in interfaceILocalCluster
- Specified by:
getTopology
in interfaceNimbus.Iface
- Parameters:
id
- the id of the topology (not the name)- Returns:
- the compiled storm topology
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getClusterInfo
Description copied from interface:ILocalCluster
Get cluster information.- Specified by:
getClusterInfo
in interfaceILocalCluster
- Specified by:
getClusterInfo
in interfaceNimbus.Iface
- Returns:
- a summary of the current state of the cluster
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getTopologySummaries
- Specified by:
getTopologySummaries
in interfaceILocalCluster
- Specified by:
getTopologySummaries
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getTopologySummaryByName
public TopologySummary getTopologySummaryByName(String name) throws org.apache.storm.thrift.TException - Specified by:
getTopologySummaryByName
in interfaceILocalCluster
- Specified by:
getTopologySummaryByName
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getTopologySummary
- Specified by:
getTopologySummary
in interfaceILocalCluster
- Specified by:
getTopologySummary
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getTopologyInfo
Description copied from interface:ILocalCluster
Get the state of a topology.- Specified by:
getTopologyInfo
in interfaceILocalCluster
- Specified by:
getTopologyInfo
in interfaceNimbus.Iface
- Parameters:
id
- the id of the topology (not the name)- Returns:
- the state of a topology
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getTopologyInfoByName
Description copied from interface:ILocalCluster
Get the state of a topology.- Specified by:
getTopologyInfoByName
in interfaceILocalCluster
- Specified by:
getTopologyInfoByName
in interfaceNimbus.Iface
- Parameters:
name
- the name of the topology (not the id)- Returns:
- the state of a topology
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getTopologyInfoWithOpts
public TopologyInfo getTopologyInfoWithOpts(String id, GetInfoOptions options) throws org.apache.storm.thrift.TException Description copied from interface:ILocalCluster
Get the state of a topology.- Specified by:
getTopologyInfoWithOpts
in interfaceILocalCluster
- Specified by:
getTopologyInfoWithOpts
in interfaceNimbus.Iface
- Parameters:
id
- the id of the topology (not the name)options
- This is to choose number of Error(s) in TopologyInfo.- Returns:
- the state of a topology
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getTopologyInfoByNameWithOpts
public TopologyInfo getTopologyInfoByNameWithOpts(String name, GetInfoOptions options) throws org.apache.storm.thrift.TException Description copied from interface:ILocalCluster
Get the state of a topology.- Specified by:
getTopologyInfoByNameWithOpts
in interfaceILocalCluster
- Specified by:
getTopologyInfoByNameWithOpts
in interfaceNimbus.Iface
- Parameters:
name
- the name of the topology (not the id)options
- This is GetInfoOptions to choose Error(s) in on TopologyInfo.- Returns:
- the state of a topology
- Throws:
org.apache.storm.thrift.TException
- on any error from nimbus
-
getThriftServerPort
public int getThriftServerPort() -
isRemoteBlobExists
public boolean isRemoteBlobExists(String blobKey) throws AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Decide if the blob is removed from cluster.- Specified by:
isRemoteBlobExists
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getSupervisor
Get a specific Supervisor. This is intended mostly for internal testing.- Parameters:
id
- the id of the supervisor
-
killSupervisor
Kill a specific supervisor. This is intended mostly for internal testing.- Parameters:
id
- the id of the supervisor
-
addSupervisor
Add another supervisor to the topology. This is intended mostly for internal testing.- Throws:
Exception
-
addSupervisor
Add another supervisor to the topology. This is intended mostly for internal testing.- Parameters:
ports
- the number of ports/slots the supervisor should have- Throws:
Exception
-
addSupervisor
Add another supervisor to the topology. This is intended mostly for internal testing.- Parameters:
ports
- the number of ports/slots the supervisor should haveid
- the id of the new supervisor, so you can find it later.- Throws:
Exception
-
addSupervisor
Add another supervisor to the topology. This is intended mostly for internal testing.- Parameters:
ports
- the number of ports/slots the supervisor should haveconf
- any config values that should be added/over written in the daemon conf of the cluster.id
- the id of the new supervisor, so you can find it later.- Throws:
Exception
-
waitForIdle
Wait for the cluster to be idle. This is intended to be used with Simulated time and is for internal testing. Note that this does not wait for spout or bolt executors to be idle.- Throws:
InterruptedException
- if interrupted while waiting.AssertionError
- if the cluster did not come to an idle point with a timeout.
-
waitForIdle
Wait for the cluster to be idle. This is intended to be used with Simulated time and is for internal testing. Note that this does not wait for spout or bolt executors to be idle.- Parameters:
timeoutMs
- the number of ms to wait before throwing an error.- Throws:
InterruptedException
- if interrupted while waiting.AssertionError
- if the cluster did not come to an idle point with a timeout.
-
advanceClusterTime
Description copied from interface:ILocalCluster
Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Specified by:
advanceClusterTime
in interfaceILocalCluster
- Parameters:
secs
- the number of seconds to advance time- Throws:
InterruptedException
-
advanceClusterTime
Description copied from interface:ILocalCluster
Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Specified by:
advanceClusterTime
in interfaceILocalCluster
- Parameters:
secs
- the number of seconds to advance timeincSecs
- the number of steps we should take when advancing simulated time- Throws:
InterruptedException
-
getClusterState
Description copied from interface:ILocalCluster
This is intended for internal testing only.- Specified by:
getClusterState
in interfaceILocalCluster
- Returns:
- an internal class that holds the state of the cluster.
-
getTrackedId
Description copied from interface:ILocalCluster
If the cluster is tracked get the id for the tracked cluster. This is intended for internal testing only.- Specified by:
getTrackedId
in interfaceILocalCluster
- Returns:
- the id of the tracked cluster
-
setLogConfig
- Specified by:
setLogConfig
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getLogConfig
- Specified by:
getLogConfig
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
debug
public void debug(String name, String component, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Enable/disable logging the tuples generated in topology via an internal EventLogger bolt. The component name is optional and if null or empty, the debug flag will apply to the entire topology. The 'samplingPercentage' will limit loggging to a percentage of generated tuples.- Specified by:
debug
in interfaceNimbus.Iface
- Throws:
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
-
setWorkerProfiler
public void setWorkerProfiler(String id, ProfileRequest profileRequest) throws org.apache.storm.thrift.TException - Specified by:
setWorkerProfiler
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getComponentPendingProfileActions
public List<ProfileRequest> getComponentPendingProfileActions(String id, String componentId, ProfileAction action) throws org.apache.storm.thrift.TException - Specified by:
getComponentPendingProfileActions
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
beginCreateBlob
public String beginCreateBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.storm.thrift.TException - Specified by:
beginCreateBlob
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyAlreadyExistsException
org.apache.storm.thrift.TException
-
beginUpdateBlob
public String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
beginUpdateBlob
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
uploadBlobChunk
public void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
uploadBlobChunk
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
finishBlobUpload
public void finishBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
finishBlobUpload
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
cancelBlobUpload
public void cancelBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
cancelBlobUpload
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getBlobMeta
public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
getBlobMeta
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
setBlobMeta
public void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
setBlobMeta
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
beginBlobDownload
public BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
beginBlobDownload
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
downloadBlobChunk
public ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
downloadBlobChunk
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
deleteBlob
public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
deleteBlob
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
listBlobs
- Specified by:
listBlobs
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
getBlobReplication
public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
getBlobReplication
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
updateBlobReplication
public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException - Specified by:
updateBlobReplication
in interfaceNimbus.Iface
- Throws:
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
-
createStateInZookeeper
- Specified by:
createStateInZookeeper
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-
beginFileUpload
- Specified by:
beginFileUpload
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
uploadChunk
public void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
uploadChunk
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
finishFileUpload
public void finishFileUpload(String location) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
finishFileUpload
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
downloadChunk
public ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
downloadChunk
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getNimbusConf
- Specified by:
getNimbusConf
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getLeader
- Specified by:
getLeader
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
isTopologyNameAllowed
public boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
isTopologyNameAllowed
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getTopologyPageInfo
public TopologyPageInfo getTopologyPageInfo(String id, String window, boolean isIncludeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException - Specified by:
getTopologyPageInfo
in interfaceNimbus.Iface
- Throws:
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
-
getSupervisorPageInfo
public SupervisorPageInfo getSupervisorPageInfo(String id, String host, boolean isIncludeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException - Specified by:
getSupervisorPageInfo
in interfaceNimbus.Iface
- Throws:
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
-
getComponentPageInfo
public ComponentPageInfo getComponentPageInfo(String topologyId, String componentId, String window, boolean isIncludeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException - Specified by:
getComponentPageInfo
in interfaceNimbus.Iface
- Throws:
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
-
getUserTopology
public StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Returns the user specified topology as submitted originally. CompareNimbus.Iface.getTopology(String id)
.- Specified by:
getUserTopology
in interfaceNimbus.Iface
- Throws:
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
-
getTopologyHistory
public TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
getTopologyHistory
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getOwnerResourceSummaries
public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.storm.thrift.TException - Specified by:
getOwnerResourceSummaries
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
getSupervisorAssignments
public SupervisorAssignments getSupervisorAssignments(String node) throws AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Get assigned assignments for a specific supervisor- Specified by:
getSupervisorAssignments
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
sendSupervisorWorkerHeartbeats
public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats) throws AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Send supervisor worker heartbeats for a specific supervisor- Specified by:
sendSupervisorWorkerHeartbeats
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
sendSupervisorWorkerHeartbeat
public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, org.apache.storm.thrift.TException Description copied from interface:Nimbus.Iface
Send supervisor local worker heartbeat when a supervisor is unreachable- Specified by:
sendSupervisorWorkerHeartbeat
in interfaceNimbus.Iface
- Throws:
AuthorizationException
org.apache.storm.thrift.TException
-
processWorkerMetrics
- Specified by:
processWorkerMetrics
in interfaceNimbus.Iface
- Throws:
org.apache.storm.thrift.TException
-