Package org.apache.cassandra.streaming
Class StreamManager
java.lang.Object
org.apache.cassandra.streaming.StreamManager
- All Implemented Interfaces:
NotificationBroadcaster,NotificationEmitter,StreamManagerMBean
StreamManager manages currently running
StreamResultFutures and provides status of all operation invoked.
All stream operations should be created through this class to track streaming status and progress.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
FieldsFields inherited from interface org.apache.cassandra.streaming.StreamManagerMBean
OBJECT_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(StreamManager.StreamListener listener) voidaddNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) protected voidvoidfindSession(InetAddressAndPort peer, TimeUUID planId, int sessionIndex, boolean searchInitiatorSessions) Returns the current state of all ongoing streams.Get streaming rate limiter for entire SSTable operations.getInitiatorStream(TimeUUID planId) Gets streaming rate limiter.getReceivingStream(TimeUUID planId) booleanlongvoidputFollowerStream(StreamResultFuture future) voidputInitiatorStream(StreamResultFuture future) voidputStreamingState(StreamingState state) registerFollower(StreamResultFuture result) voidregisterInitiator(StreamResultFuture result) voidremoveListener(StreamManager.StreamListener listener) voidvoidremoveNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) voidSets the timeout for the streaming slow events logvoidsetStreamingStatsEnabled(boolean streamingStatsEnabled) enable/disable collection of streaming stats while streaming is running.voidstart()voidstop()
-
Field Details
-
instance
-
-
Constructor Details
-
StreamManager
public StreamManager()
-
-
Method Details
-
getRateLimiter
Gets streaming rate limiter. When stream_throughput_outbound is 0, this returns rate limiter with the rate of Double.MAX_VALUE bytes per second. Rate unit is bytes per sec.- Returns:
- StreamRateLimiter with rate limit set based on peer location.
-
getEntireSSTableRateLimiter
Get streaming rate limiter for entire SSTable operations. Whenentire_sstable_stream_throughput_outboundis less than or equal ot0, this returns rate limiter with the rate ofDouble.MAX_VALUEbytes per second. Rate unit is bytes per sec.- Parameters:
peer- the peer location- Returns:
StreamManager.StreamRateLimiterwith entire SSTable rate limit set based on peer location
-
addStreamingStateAgain
-
start
public void start() -
stop
public void stop() -
getStreamingStates
-
getStreamingState
-
putStreamingState
-
clearStates
public void clearStates() -
getCurrentStreams
Description copied from interface:StreamManagerMBeanReturns the current state of all ongoing streams.- Specified by:
getCurrentStreamsin interfaceStreamManagerMBean
-
getStreamingStatsEnabled
public boolean getStreamingStatsEnabled()- Specified by:
getStreamingStatsEnabledin interfaceStreamManagerMBean- Returns:
- whether the streaming virtual table should collect stats while streaming is running
-
setStreamingStatsEnabled
public void setStreamingStatsEnabled(boolean streamingStatsEnabled) Description copied from interface:StreamManagerMBeanenable/disable collection of streaming stats while streaming is running.- Specified by:
setStreamingStatsEnabledin interfaceStreamManagerMBean
-
getStreamingSlowEventsLogTimeout
- Specified by:
getStreamingSlowEventsLogTimeoutin interfaceStreamManagerMBean- Returns:
- current timeout for streaming slow events log
-
setStreamingSlowEventsLogTimeout
Description copied from interface:StreamManagerMBeanSets the timeout for the streaming slow events log- Specified by:
setStreamingSlowEventsLogTimeoutin interfaceStreamManagerMBean
-
registerInitiator
-
registerFollower
-
putInitiatorStream
-
putFollowerStream
-
addListener
-
removeListener
-
getReceivingStream
-
getInitiatorStream
-
addNotificationListener
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) - Specified by:
addNotificationListenerin interfaceNotificationBroadcaster
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationBroadcaster- Throws:
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceNotificationEmitter- Throws:
ListenerNotFoundException
-
getNotificationInfo
- Specified by:
getNotificationInfoin interfaceNotificationBroadcaster
-
findSession
public StreamSession findSession(InetAddressAndPort peer, TimeUUID planId, int sessionIndex, boolean searchInitiatorSessions) -
getTotalRemainingOngoingBytes
public long getTotalRemainingOngoingBytes()
-