Package org.apache.storm
Class LocalCluster
- java.lang.Object
-
- org.apache.storm.LocalCluster
-
- All Implemented Interfaces:
AutoCloseable,Nimbus.Iface,ILocalCluster,ILocalClusterTrackedTopologyAware
public class LocalCluster extends Object implements ILocalClusterTrackedTopologyAware, Nimbus.Iface
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
Nested Classes Modifier and Type Class Description static classLocalCluster.BuilderSimple way to configure a LocalCluster to meet your needs.classLocalCluster.LocalTopologyWhen running a topology locally, for tests etc.-
Nested classes/interfaces inherited from interface org.apache.storm.ILocalCluster
ILocalCluster.ILocalTopology
-
-
Field Summary
Fields Modifier and Type Field Description static KillOptionsKILL_NOW
-
Constructor Summary
Constructors Constructor Description LocalCluster()Create a default LocalCluster.LocalCluster(String zkHost, Long zkPort)Create a LocalCluster that connects to an existing Zookeeper instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(String topologyName)Activate a topology.SupervisoraddSupervisor()Add another supervisor to the topology.SupervisoraddSupervisor(Number ports)Add another supervisor to the topology.SupervisoraddSupervisor(Number ports, String id)Add another supervisor to the topology.SupervisoraddSupervisor(Number ports, Map<String,Object> conf, String id)Add another supervisor to the topology.voidadvanceClusterTime(int secs)Advance the cluster time when the cluster is using SimulatedTime.voidadvanceClusterTime(int secs, int incSecs)Advance the cluster time when the cluster is using SimulatedTime.BeginDownloadResultbeginBlobDownload(String key)StringbeginCreateBlob(String key, SettableBlobMeta meta)StringbeginFileUpload()StringbeginUpdateBlob(String key)voidcancelBlobUpload(String session)voidclose()voidcreateStateInZookeeper(String key)voiddeactivate(String topologyName)Deactivate a topology.voiddebug(String name, String component, boolean enable, double samplingPercentage)Enable/disable logging the tuples generated in topology via an internal EventLogger bolt.voiddeleteBlob(String key)ByteBufferdownloadBlobChunk(String session)ByteBufferdownloadChunk(String id)voidfinishBlobUpload(String session)voidfinishFileUpload(String location)ReadableBlobMetagetBlobMeta(String key)intgetBlobReplication(String key)ClusterSummarygetClusterInfo()Get cluster information.IStormClusterStategetClusterState()This is intended for internal testing only.ComponentPageInfogetComponentPageInfo(String topologyId, String componentId, String window, boolean isIncludeSys)List<ProfileRequest>getComponentPendingProfileActions(String id, String componentId, ProfileAction action)Map<String,Object>getDaemonConf()Get daemon configuration.NimbusSummarygetLeader()LogConfiggetLogConfig(String name)StormMetricsRegistrygetMetricRegistry()Reference to metrics registry.NimbusgetNimbus()Reference to nimbus.StringgetNimbusConf()List<OwnerResourceSummary>getOwnerResourceSummaries(String owner)SupervisorgetSupervisor(String id)Get a specific Supervisor.SupervisorAssignmentsgetSupervisorAssignments(String node)Get assigned assignments for a specific supervisorSupervisorPageInfogetSupervisorPageInfo(String id, String host, boolean isIncludeSys)intgetThriftServerPort()StormTopologygetTopology(String id)Get the compiled storm topology.StringgetTopologyConf(String id)The config of a topology as a JSON string.TopologyHistoryInfogetTopologyHistory(String user)TopologyInfogetTopologyInfo(String id)Get the state of a topology.TopologyInfogetTopologyInfoByName(String name)Get the state of a topology.TopologyInfogetTopologyInfoByNameWithOpts(String name, GetInfoOptions options)Get the state of a topology.TopologyInfogetTopologyInfoWithOpts(String id, GetInfoOptions options)Get the state of a topology.TopologyPageInfogetTopologyPageInfo(String id, String window, boolean isIncludeSys)List<TopologySummary>getTopologySummaries()TopologySummarygetTopologySummary(String id)TopologySummarygetTopologySummaryByName(String name)StringgetTrackedId()If the cluster is tracked get the id for the tracked cluster.StormTopologygetUserTopology(String id)Returns the user specified topology as submitted originally.booleanisRemoteBlobExists(String blobKey)Decide if the blob is removed from cluster.booleanisTopologyNameAllowed(String name)voidkillSupervisor(String id)Kill a specific supervisor.voidkillTopology(String topologyName)Kill a topology (if you are not using ILocalTopology).voidkillTopologyWithOpts(String name, KillOptions options)Kill a topology (if you are not using ILocalTopology).ListBlobsResultlistBlobs(String session)static voidmain(String[] args)Main entry point to running in local mode.voidprocessWorkerMetrics(WorkerMetrics metrics)voidrebalance(String name, RebalanceOptions options)Rebalance a topology.voidsendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat)Send supervisor local worker heartbeat when a supervisor is unreachablevoidsendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats)Send supervisor worker heartbeats for a specific supervisorvoidsetBlobMeta(String key, SettableBlobMeta meta)voidsetLogConfig(String name, LogConfig config)voidsetWorkerProfiler(String id, ProfileRequest profileRequest)voidshutdown()Shut down the cluster.voidsubmitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology)LocalCluster.LocalTopologysubmitTopology(String topologyName, Map<String,Object> conf, StormTopology topology)Submit a topology to be run in local mode.LocalCluster.LocalTopologysubmitTopology(String topologyName, Map<String,Object> conf, TrackedTopology topology)Submit a tracked topology to be run in local mode.voidsubmitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options)LocalCluster.LocalTopologysubmitTopologyWithOpts(String topologyName, Map<String,Object> conf, StormTopology topology, SubmitOptions submitOpts)Submit a topology to be run in local mode.LocalCluster.LocalTopologysubmitTopologyWithOpts(String topologyName, Map<String,Object> conf, TrackedTopology topology, SubmitOptions submitOpts)Submit a tracked topology to be run in local mode.intupdateBlobReplication(String key, int replication)voiduploadBlobChunk(String session, ByteBuffer chunk)voiduploadChunk(String location, ByteBuffer chunk)voiduploadNewCredentials(String topologyName, Credentials creds)Upload new credentials to a topology.voidwaitForIdle()Wait for the cluster to be idle.voidwaitForIdle(long timeoutMs)Wait for the cluster to be idle.static <T> TwithLocalModeOverride(Callable<T> c, long ttlSec)Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.static <T> TwithLocalModeOverride(Callable<T> c, long ttlSec, Map<String,Object> daemonConf)Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.
-
-
-
Field Detail
-
KILL_NOW
public static final KillOptions KILL_NOW
-
-
Method Detail
-
withLocalModeOverride
public static <T> T withLocalModeOverride(Callable<T> c, long ttlSec) throws Exception
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 Exception
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 completeddaemonConf- configs to set for the daemon processes.- Returns:
- the result of calling C
- Throws:
Exception- on any Exception.
-
main
public static void main(String[] args) throws Exception
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
public Nimbus getNimbus()
Reference to nimbus.- Returns:
- Nimbus itself so you can interact with it directly, if needed.
-
getMetricRegistry
public StormMetricsRegistry getMetricRegistry()
Reference to metrics registry.- Returns:
- The metrics registry for the local cluster.
-
getDaemonConf
public Map<String,Object> 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.TException
Description copied from interface:ILocalClusterSubmit a topology to be run in local mode.- Specified by:
submitTopologyin 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.TException
Description copied from interface:ILocalClusterTrackedTopologyAwareSubmit a tracked topology to be run in local mode.- Specified by:
submitTopologyin 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:
submitTopologyin interfaceNimbus.Iface- Throws:
AlreadyAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
submitTopologyWithOpts
public LocalCluster.LocalTopology submitTopologyWithOpts(String topologyName, Map<String,Object> conf, StormTopology topology, SubmitOptions submitOpts) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterSubmit a topology to be run in local mode.- Specified by:
submitTopologyWithOptsin 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.TException
Description copied from interface:ILocalClusterTrackedTopologyAwareSubmit a tracked topology to be run in local mode.- Specified by:
submitTopologyWithOptsin 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:
submitTopologyWithOptsin interfaceNimbus.Iface- Throws:
AlreadyAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
uploadNewCredentials
public void uploadNewCredentials(String topologyName, Credentials creds) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterUpload new credentials to a topology.- Specified by:
uploadNewCredentialsin interfaceILocalCluster- Specified by:
uploadNewCredentialsin 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
public void killTopology(String topologyName) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterKill a topology (if you are not using ILocalTopology).- Specified by:
killTopologyin interfaceILocalCluster- Specified by:
killTopologyin 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:ILocalClusterKill a topology (if you are not using ILocalTopology).- Specified by:
killTopologyWithOptsin interfaceILocalCluster- Specified by:
killTopologyWithOptsin 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
public void activate(String topologyName) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterActivate a topology.- Specified by:
activatein interfaceILocalCluster- Specified by:
activatein interfaceNimbus.Iface- Parameters:
topologyName- the name of the topology to activate- Throws:
org.apache.storm.thrift.TException- on any error from nimbus
-
deactivate
public void deactivate(String topologyName) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterDeactivate a topology.- Specified by:
deactivatein interfaceILocalCluster- Specified by:
deactivatein 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:ILocalClusterRebalance a topology.- Specified by:
rebalancein interfaceILocalCluster- Specified by:
rebalancein 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:ILocalClusterShut down the cluster.- Specified by:
shutdownin interfaceILocalCluster
-
getTopologyConf
public String getTopologyConf(String id) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterThe config of a topology as a JSON string.- Specified by:
getTopologyConfin interfaceILocalCluster- Specified by:
getTopologyConfin 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
public StormTopology getTopology(String id) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterGet the compiled storm topology.- Specified by:
getTopologyin interfaceILocalCluster- Specified by:
getTopologyin 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
public ClusterSummary getClusterInfo() throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterGet cluster information.- Specified by:
getClusterInfoin interfaceILocalCluster- Specified by:
getClusterInfoin interfaceNimbus.Iface- Returns:
- a summary of the current state of the cluster
- Throws:
org.apache.storm.thrift.TException- on any error from nimbus
-
getTopologySummaries
public List<TopologySummary> getTopologySummaries() throws org.apache.storm.thrift.TException
- Specified by:
getTopologySummariesin interfaceILocalCluster- Specified by:
getTopologySummariesin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
getTopologySummaryByName
public TopologySummary getTopologySummaryByName(String name) throws org.apache.storm.thrift.TException
- Specified by:
getTopologySummaryByNamein interfaceILocalCluster- Specified by:
getTopologySummaryByNamein interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
getTopologySummary
public TopologySummary getTopologySummary(String id) throws org.apache.storm.thrift.TException
- Specified by:
getTopologySummaryin interfaceILocalCluster- Specified by:
getTopologySummaryin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
getTopologyInfo
public TopologyInfo getTopologyInfo(String id) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterGet the state of a topology.- Specified by:
getTopologyInfoin interfaceILocalCluster- Specified by:
getTopologyInfoin 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
public TopologyInfo getTopologyInfoByName(String name) throws org.apache.storm.thrift.TException
Description copied from interface:ILocalClusterGet the state of a topology.- Specified by:
getTopologyInfoByNamein interfaceILocalCluster- Specified by:
getTopologyInfoByNamein 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:ILocalClusterGet the state of a topology.- Specified by:
getTopologyInfoWithOptsin interfaceILocalCluster- Specified by:
getTopologyInfoWithOptsin 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:ILocalClusterGet the state of a topology.- Specified by:
getTopologyInfoByNameWithOptsin interfaceILocalCluster- Specified by:
getTopologyInfoByNameWithOptsin 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.IfaceDecide if the blob is removed from cluster.- Specified by:
isRemoteBlobExistsin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getSupervisor
public Supervisor getSupervisor(String id)
Get a specific Supervisor. This is intended mostly for internal testing.- Parameters:
id- the id of the supervisor
-
killSupervisor
public void killSupervisor(String id)
Kill a specific supervisor. This is intended mostly for internal testing.- Parameters:
id- the id of the supervisor
-
addSupervisor
public Supervisor addSupervisor() throws Exception
Add another supervisor to the topology. This is intended mostly for internal testing.- Throws:
Exception
-
addSupervisor
public Supervisor addSupervisor(Number ports) throws Exception
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
public Supervisor addSupervisor(Number ports, String id) throws Exception
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
public Supervisor addSupervisor(Number ports, Map<String,Object> conf, String id) throws Exception
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
public void waitForIdle() throws InterruptedExceptionWait 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
public void waitForIdle(long timeoutMs) throws InterruptedExceptionWait 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
public void advanceClusterTime(int secs) throws InterruptedExceptionDescription copied from interface:ILocalClusterAdvance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Specified by:
advanceClusterTimein interfaceILocalCluster- Parameters:
secs- the number of seconds to advance time- Throws:
InterruptedException
-
advanceClusterTime
public void advanceClusterTime(int secs, int incSecs) throws InterruptedExceptionDescription copied from interface:ILocalClusterAdvance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Specified by:
advanceClusterTimein interfaceILocalCluster- Parameters:
secs- the number of seconds to advance timeincSecs- the number of steps we should take when advancing simulated time- Throws:
InterruptedException
-
getClusterState
public IStormClusterState getClusterState()
Description copied from interface:ILocalClusterThis is intended for internal testing only.- Specified by:
getClusterStatein interfaceILocalCluster- Returns:
- an internal class that holds the state of the cluster.
-
getTrackedId
public String getTrackedId()
Description copied from interface:ILocalClusterIf the cluster is tracked get the id for the tracked cluster. This is intended for internal testing only.- Specified by:
getTrackedIdin interfaceILocalCluster- Returns:
- the id of the tracked cluster
-
setLogConfig
public void setLogConfig(String name, LogConfig config) throws org.apache.storm.thrift.TException
- Specified by:
setLogConfigin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
getLogConfig
public LogConfig getLogConfig(String name) throws org.apache.storm.thrift.TException
- Specified by:
getLogConfigin 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.IfaceEnable/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:
debugin interfaceNimbus.Iface- Throws:
NotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
setWorkerProfiler
public void setWorkerProfiler(String id, ProfileRequest profileRequest) throws org.apache.storm.thrift.TException
- Specified by:
setWorkerProfilerin 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:
getComponentPendingProfileActionsin 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:
beginCreateBlobin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyAlreadyExistsExceptionorg.apache.storm.thrift.TException
-
beginUpdateBlob
public String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
beginUpdateBlobin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
uploadBlobChunk
public void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
uploadBlobChunkin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
finishBlobUpload
public void finishBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
finishBlobUploadin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
cancelBlobUpload
public void cancelBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
cancelBlobUploadin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getBlobMeta
public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
getBlobMetain interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
setBlobMeta
public void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
setBlobMetain interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
beginBlobDownload
public BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
beginBlobDownloadin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
downloadBlobChunk
public ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
downloadBlobChunkin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
deleteBlob
public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
deleteBlobin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
listBlobs
public ListBlobsResult listBlobs(String session) throws org.apache.storm.thrift.TException
- Specified by:
listBlobsin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
getBlobReplication
public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
getBlobReplicationin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
updateBlobReplication
public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
- Specified by:
updateBlobReplicationin interfaceNimbus.Iface- Throws:
AuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TException
-
createStateInZookeeper
public void createStateInZookeeper(String key) throws org.apache.storm.thrift.TException
- Specified by:
createStateInZookeeperin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
beginFileUpload
public String beginFileUpload() throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
beginFileUploadin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
uploadChunk
public void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
uploadChunkin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
finishFileUpload
public void finishFileUpload(String location) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
finishFileUploadin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
downloadChunk
public ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
downloadChunkin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getNimbusConf
public String getNimbusConf() throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getNimbusConfin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getLeader
public NimbusSummary getLeader() throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getLeaderin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
isTopologyNameAllowed
public boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
isTopologyNameAllowedin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getTopologyPageInfo
public TopologyPageInfo getTopologyPageInfo(String id, String window, boolean isIncludeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getTopologyPageInfoin interfaceNimbus.Iface- Throws:
NotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
getSupervisorPageInfo
public SupervisorPageInfo getSupervisorPageInfo(String id, String host, boolean isIncludeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getSupervisorPageInfoin interfaceNimbus.Iface- Throws:
NotAliveExceptionAuthorizationExceptionorg.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:
getComponentPageInfoin interfaceNimbus.Iface- Throws:
NotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
getUserTopology
public StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
Description copied from interface:Nimbus.IfaceReturns the user specified topology as submitted originally. CompareNimbus.Iface.getTopology(String id).- Specified by:
getUserTopologyin interfaceNimbus.Iface- Throws:
NotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TException
-
getTopologyHistory
public TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getTopologyHistoryin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getOwnerResourceSummaries
public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.storm.thrift.TException
- Specified by:
getOwnerResourceSummariesin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
getSupervisorAssignments
public SupervisorAssignments getSupervisorAssignments(String node) throws AuthorizationException, org.apache.storm.thrift.TException
Description copied from interface:Nimbus.IfaceGet assigned assignments for a specific supervisor- Specified by:
getSupervisorAssignmentsin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
sendSupervisorWorkerHeartbeats
public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats) throws AuthorizationException, org.apache.storm.thrift.TException
Description copied from interface:Nimbus.IfaceSend supervisor worker heartbeats for a specific supervisor- Specified by:
sendSupervisorWorkerHeartbeatsin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
sendSupervisorWorkerHeartbeat
public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat) throws AuthorizationException, org.apache.storm.thrift.TException
Description copied from interface:Nimbus.IfaceSend supervisor local worker heartbeat when a supervisor is unreachable- Specified by:
sendSupervisorWorkerHeartbeatin interfaceNimbus.Iface- Throws:
AuthorizationExceptionorg.apache.storm.thrift.TException
-
processWorkerMetrics
public void processWorkerMetrics(WorkerMetrics metrics) throws org.apache.storm.thrift.TException
- Specified by:
processWorkerMetricsin interfaceNimbus.Iface- Throws:
org.apache.storm.thrift.TException
-
-