public class Nimbus extends Object implements Nimbus.Iface, Shutdownable, DaemonCommon
Modifier and Type | Class and Description |
---|---|
static class |
Nimbus.StandaloneINimbus |
Modifier and Type | Field and Description |
---|---|
static SimpleVersion |
MIN_VERSION_SUPPORT_RPC_HEARTBEAT |
static Subject |
NIMBUS_SUBJECT |
static List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> |
ZK_ACLS |
Constructor and Description |
---|
Nimbus(Map<String,Object> conf,
INimbus inimbus,
IStormClusterState stormClusterState,
NimbusInfo hostPortInfo,
BlobStore blobStore,
ILeaderElector leaderElector,
IGroupMappingServiceProvider groupMapper,
StormMetricsRegistry metricsRegistry) |
Nimbus(Map<String,Object> conf,
INimbus inimbus,
IStormClusterState stormClusterState,
NimbusInfo hostPortInfo,
BlobStore blobStore,
TopoCache topoCache,
ILeaderElector leaderElector,
IGroupMappingServiceProvider groupMapper,
StormMetricsRegistry metricsRegistry) |
Nimbus(Map<String,Object> conf,
INimbus inimbus,
StormMetricsRegistry metricsRegistry) |
public static final List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> ZK_ACLS
public static final SimpleVersion MIN_VERSION_SUPPORT_RPC_HEARTBEAT
public static final Subject NIMBUS_SUBJECT
public Nimbus(Map<String,Object> conf, INimbus inimbus, StormMetricsRegistry metricsRegistry) throws Exception
Exception
public Nimbus(Map<String,Object> conf, INimbus inimbus, IStormClusterState stormClusterState, NimbusInfo hostPortInfo, BlobStore blobStore, ILeaderElector leaderElector, IGroupMappingServiceProvider groupMapper, StormMetricsRegistry metricsRegistry) throws Exception
Exception
public Nimbus(Map<String,Object> conf, INimbus inimbus, IStormClusterState stormClusterState, NimbusInfo hostPortInfo, BlobStore blobStore, TopoCache topoCache, ILeaderElector leaderElector, IGroupMappingServiceProvider groupMapper, StormMetricsRegistry metricsRegistry) throws Exception
Exception
public static List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> getNimbusAcls(Map<String,Object> conf)
public static int getVersionForKey(String key, NimbusInfo nimbusInfo, org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zkClient) throws KeyNotFoundException
KeyNotFoundException
public static Set<String> topoIdsToClean(IStormClusterState state, BlobStore store, Map<String,Object> conf)
public static void cleanInbox(String dirLoc, int seconds)
Deletes jar files in dirLoc older than seconds.
dirLoc
- the location to look in for fileseconds
- how old is too old and should be deletedpublic static List<String> topologiesOnSupervisor(Map<String,Assignment> assignments, String supervisorId)
public void setAuthorizationHandler(IAuthorizer authorizationHandler)
public HeartbeatCache getHeartbeatsCache()
public void addSupervisor(Supervisor supervisor)
Used for local cluster.
supervisor
- Supervisor
public void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation) throws AuthorizationException
AuthorizationException
public void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation, ReqContext context) throws AuthorizationException
AuthorizationException
public Set<String> filterAuthorized(String operation, Collection<String> topoIds) throws NotAliveException, AuthorizationException, IOException
public void rmDependencyJarsInTopology(String topoId)
public void rmTopologyKeys(String topoId)
public void forceDeleteTopoDistDir(String topoId) throws IOException
IOException
public boolean awaitLeadership(long timeout, TimeUnit timeUnit) throws InterruptedException
InterruptedException
public void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
submitTopology
in interface Nimbus.Iface
AlreadyAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
public void submitTopologyWithOpts(String topoName, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
submitTopologyWithOpts
in interface Nimbus.Iface
AlreadyAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
public static void setUpAckerExecutorConfigs(String topoName, Map<String,Object> totalConfToSave, Map<String,Object> totalConf, int estimatedNumWorker)
public void killTopology(String name) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
killTopology
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public void killTopologyWithOpts(String topoName, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
killTopologyWithOpts
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public void activate(String topoName) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
activate
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public void deactivate(String topoName) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
deactivate
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public void rebalance(String topoName, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
rebalance
in interface Nimbus.Iface
NotAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
public void setLogConfig(String topoId, LogConfig config) throws org.apache.storm.thrift.TException
setLogConfig
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public LogConfig getLogConfig(String topoId) throws org.apache.storm.thrift.TException
getLogConfig
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public void debug(String topoName, String componentId, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
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.
debug
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public void setWorkerProfiler(String topoId, ProfileRequest profileRequest) throws org.apache.storm.thrift.TException
setWorkerProfiler
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public List<ProfileRequest> getComponentPendingProfileActions(String id, String componentId, ProfileAction action) throws org.apache.storm.thrift.TException
getComponentPendingProfileActions
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public void uploadNewCredentials(String topoName, Credentials credentials) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
uploadNewCredentials
in interface Nimbus.Iface
NotAliveException
InvalidTopologyException
AuthorizationException
org.apache.storm.thrift.TException
public String beginCreateBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.storm.thrift.TException
beginCreateBlob
in interface Nimbus.Iface
AuthorizationException
KeyAlreadyExistsException
org.apache.storm.thrift.TException
public String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
beginUpdateBlob
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
uploadBlobChunk
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void finishBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
finishBlobUpload
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void cancelBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
cancelBlobUpload
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
getBlobMeta
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
setBlobMeta
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
beginBlobDownload
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.storm.thrift.TException
downloadBlobChunk
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, IllegalStateException, org.apache.storm.thrift.TException
deleteBlob
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
IllegalStateException
org.apache.storm.thrift.TException
public ListBlobsResult listBlobs(String session) throws org.apache.storm.thrift.TException
listBlobs
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
getBlobReplication
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
updateBlobReplication
in interface Nimbus.Iface
AuthorizationException
KeyNotFoundException
org.apache.storm.thrift.TException
public void createStateInZookeeper(String key) throws org.apache.storm.thrift.TException
createStateInZookeeper
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public String beginFileUpload() throws AuthorizationException, org.apache.storm.thrift.TException
beginFileUpload
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
uploadChunk
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void finishFileUpload(String location) throws AuthorizationException, org.apache.storm.thrift.TException
finishFileUpload
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.storm.thrift.TException
downloadChunk
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public String getNimbusConf() throws AuthorizationException, org.apache.storm.thrift.TException
getNimbusConf
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public TopologyInfo getTopologyInfo(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyInfo
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public TopologyInfo getTopologyInfoByName(String name) throws org.apache.storm.thrift.TException
getTopologyInfoByName
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public TopologyInfo getTopologyInfoByNameWithOpts(String name, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyInfoByNameWithOpts
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public TopologyInfo getTopologyInfoWithOpts(String topoId, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyInfoWithOpts
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public TopologyPageInfo getTopologyPageInfo(String topoId, String window, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyPageInfo
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public SupervisorPageInfo getSupervisorPageInfo(String superId, String host, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getSupervisorPageInfo
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public ComponentPageInfo getComponentPageInfo(String topoId, String componentId, String window, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getComponentPageInfo
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public String getTopologyConf(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyConf
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public StormTopology getTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Returns the compiled topology that contains ackers and metrics consumsers. Compare Nimbus.Iface.getUserTopology(String id)
.
getTopology
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Returns the user specified topology as submitted originally. Compare Nimbus.Iface.getTopology(String id)
.
getUserTopology
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.storm.thrift.TException
getTopologyHistory
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public ClusterSummary getClusterInfo() throws AuthorizationException, org.apache.storm.thrift.TException
getClusterInfo
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public List<TopologySummary> getTopologySummaries() throws AuthorizationException, org.apache.storm.thrift.TException
getTopologySummaries
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public TopologySummary getTopologySummaryByName(String name) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologySummaryByName
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public TopologySummary getTopologySummary(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologySummary
in interface Nimbus.Iface
NotAliveException
AuthorizationException
org.apache.storm.thrift.TException
public NimbusSummary getLeader() throws AuthorizationException, org.apache.storm.thrift.TException
getLeader
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.storm.thrift.TException
isTopologyNameAllowed
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.storm.thrift.TException
getOwnerResourceSummaries
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public SupervisorAssignments getSupervisorAssignments(String nodeId) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Get assigned assignments for a specific supervisor
getSupervisorAssignments
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Send supervisor worker heartbeats for a specific supervisor
sendSupervisorWorkerHeartbeats
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat hb) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Send supervisor local worker heartbeat when a supervisor is unreachable
sendSupervisorWorkerHeartbeat
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
public void shutdown()
shutdown
in interface Shutdownable
public boolean isWaiting()
isWaiting
in interface DaemonCommon
public void processWorkerMetrics(WorkerMetrics metrics) throws org.apache.storm.thrift.TException
processWorkerMetrics
in interface Nimbus.Iface
org.apache.storm.thrift.TException
public boolean isRemoteBlobExists(String blobKey) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.Iface
Decide if the blob is removed from cluster.
isRemoteBlobExists
in interface Nimbus.Iface
AuthorizationException
org.apache.storm.thrift.TException
Copyright © 2022 The Apache Software Foundation. All rights reserved.