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
Exceptionpublic Nimbus(Map<String,Object> conf, INimbus inimbus, IStormClusterState stormClusterState, NimbusInfo hostPortInfo, BlobStore blobStore, ILeaderElector leaderElector, IGroupMappingServiceProvider groupMapper, StormMetricsRegistry metricsRegistry) throws Exception
Exceptionpublic Nimbus(Map<String,Object> conf, INimbus inimbus, IStormClusterState stormClusterState, NimbusInfo hostPortInfo, BlobStore blobStore, TopoCache topoCache, ILeaderElector leaderElector, IGroupMappingServiceProvider groupMapper, StormMetricsRegistry metricsRegistry) throws Exception
Exceptionpublic 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
KeyNotFoundExceptionpublic 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 - Supervisorpublic void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation) throws AuthorizationException
AuthorizationExceptionpublic void checkAuthorization(String topoName, Map<String,Object> topoConf, String operation, ReqContext context) throws AuthorizationException
AuthorizationExceptionpublic 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
IOExceptionpublic boolean awaitLeadership(long timeout,
TimeUnit timeUnit)
throws InterruptedException
InterruptedExceptionpublic void submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
submitTopology in interface Nimbus.IfaceAlreadyAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic 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.IfaceAlreadyAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void killTopology(String name) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
killTopology in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void killTopologyWithOpts(String topoName, KillOptions options) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
killTopologyWithOpts in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void activate(String topoName) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
activate in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void deactivate(String topoName) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
deactivate in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void rebalance(String topoName, RebalanceOptions options) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
rebalance in interface Nimbus.IfaceNotAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void setLogConfig(String topoId, LogConfig config) throws org.apache.storm.thrift.TException
setLogConfig in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic LogConfig getLogConfig(String topoId) throws org.apache.storm.thrift.TException
getLogConfig in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic void debug(String topoName, String componentId, boolean enable, double samplingPercentage) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
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.
debug in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void setWorkerProfiler(String topoId, ProfileRequest profileRequest) throws org.apache.storm.thrift.TException
setWorkerProfiler in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic List<ProfileRequest> getComponentPendingProfileActions(String id, String componentId, ProfileAction action) throws org.apache.storm.thrift.TException
getComponentPendingProfileActions in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic void uploadNewCredentials(String topoName, Credentials credentials) throws NotAliveException, InvalidTopologyException, AuthorizationException, org.apache.storm.thrift.TException
uploadNewCredentials in interface Nimbus.IfaceNotAliveExceptionInvalidTopologyExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic String beginCreateBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException, org.apache.storm.thrift.TException
beginCreateBlob in interface Nimbus.IfaceAuthorizationExceptionKeyAlreadyExistsExceptionorg.apache.storm.thrift.TExceptionpublic String beginUpdateBlob(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
beginUpdateBlob in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic void uploadBlobChunk(String session, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
uploadBlobChunk in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void finishBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
finishBlobUpload in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void cancelBlobUpload(String session) throws AuthorizationException, org.apache.storm.thrift.TException
cancelBlobUpload in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic ReadableBlobMeta getBlobMeta(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
getBlobMeta in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
setBlobMeta in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic BeginDownloadResult beginBlobDownload(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
beginBlobDownload in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic ByteBuffer downloadBlobChunk(String session) throws AuthorizationException, org.apache.storm.thrift.TException
downloadBlobChunk in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void deleteBlob(String key) throws AuthorizationException, KeyNotFoundException, IllegalStateException, org.apache.storm.thrift.TException
deleteBlob in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionIllegalStateExceptionorg.apache.storm.thrift.TExceptionpublic ListBlobsResult listBlobs(String session) throws org.apache.storm.thrift.TException
listBlobs in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic int getBlobReplication(String key) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
getBlobReplication in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic int updateBlobReplication(String key, int replication) throws AuthorizationException, KeyNotFoundException, org.apache.storm.thrift.TException
updateBlobReplication in interface Nimbus.IfaceAuthorizationExceptionKeyNotFoundExceptionorg.apache.storm.thrift.TExceptionpublic void createStateInZookeeper(String key) throws org.apache.storm.thrift.TException
createStateInZookeeper in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic String beginFileUpload() throws AuthorizationException, org.apache.storm.thrift.TException
beginFileUpload in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void uploadChunk(String location, ByteBuffer chunk) throws AuthorizationException, org.apache.storm.thrift.TException
uploadChunk in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void finishFileUpload(String location) throws AuthorizationException, org.apache.storm.thrift.TException
finishFileUpload in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic ByteBuffer downloadChunk(String id) throws AuthorizationException, org.apache.storm.thrift.TException
downloadChunk in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic String getNimbusConf() throws AuthorizationException, org.apache.storm.thrift.TException
getNimbusConf in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic TopologyInfo getTopologyInfo(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyInfo in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic TopologyInfo getTopologyInfoWithOpts(String topoId, GetInfoOptions options) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyInfoWithOpts in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic TopologyPageInfo getTopologyPageInfo(String topoId, String window, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyPageInfo in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic SupervisorPageInfo getSupervisorPageInfo(String superId, String host, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getSupervisorPageInfo in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic ComponentPageInfo getComponentPageInfo(String topoId, String componentId, String window, boolean includeSys) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getComponentPageInfo in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic String getTopologyConf(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
getTopologyConf in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic StormTopology getTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceReturns the compiled topology that contains ackers and metrics consumsers. Compare Nimbus.Iface.getUserTopology(String id).
getTopology in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic StormTopology getUserTopology(String id) throws NotAliveException, AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceReturns the user specified topology as submitted originally. Compare Nimbus.Iface.getTopology(String id).
getUserTopology in interface Nimbus.IfaceNotAliveExceptionAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic TopologyHistoryInfo getTopologyHistory(String user) throws AuthorizationException, org.apache.storm.thrift.TException
getTopologyHistory in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic ClusterSummary getClusterInfo() throws AuthorizationException, org.apache.storm.thrift.TException
getClusterInfo in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic NimbusSummary getLeader() throws AuthorizationException, org.apache.storm.thrift.TException
getLeader in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic boolean isTopologyNameAllowed(String name) throws AuthorizationException, org.apache.storm.thrift.TException
isTopologyNameAllowed in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic List<OwnerResourceSummary> getOwnerResourceSummaries(String owner) throws AuthorizationException, org.apache.storm.thrift.TException
getOwnerResourceSummaries in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic SupervisorAssignments getSupervisorAssignments(String node) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceGet assigned assignments for a specific supervisor
getSupervisorAssignments in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceSend supervisor worker heartbeats for a specific supervisor
sendSupervisorWorkerHeartbeats in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat hb) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceSend supervisor local worker heartbeat when a supervisor is unreachable
sendSupervisorWorkerHeartbeat in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionpublic void shutdown()
shutdown in interface Shutdownablepublic boolean isWaiting()
isWaiting in interface DaemonCommonpublic void processWorkerMetrics(WorkerMetrics metrics) throws org.apache.storm.thrift.TException
processWorkerMetrics in interface Nimbus.Ifaceorg.apache.storm.thrift.TExceptionpublic boolean isRemoteBlobExists(String blobKey) throws AuthorizationException, org.apache.storm.thrift.TException
Nimbus.IfaceDecide if the blob is removed from cluster.
isRemoteBlobExists in interface Nimbus.IfaceAuthorizationExceptionorg.apache.storm.thrift.TExceptionCopyright © 2019 The Apache Software Foundation. All rights reserved.