public abstract class RateLimiter extends Object implements Logging
waitToPush method will block the thread if too many messages have been pushed too quickly, and only return when a new message has been pushed. It assumes that only one message is pushed at a time.
The spark configuration spark.streaming.receiver.maxRate gives the maximum number of messages per second that each receiver will accept.
| Constructor and Description |
|---|
RateLimiter(SparkConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
waitToPush() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic RateLimiter(SparkConf conf)