class RateLimiterDoFn[InputT] extends DoFnWithResource[InputT, InputT, RateLimiter]
DoFn which will rate limit the number of elements processed per second.
Used to rate limit throughput for a job writing to a database or making calls to external services. The limit is applied per worker and should be used with a fixed/max num workers. Having RateLimiterDoFn(1000) and 20 workers means your total rate will be 20000.
- Source
- RateLimiterDoFn.java
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- RateLimiterDoFn
- DoFnWithResource
- DoFn
- HasDisplayData
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- abstract class FinishBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class OnTimerContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class OnWindowExpirationContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class ProcessContext extends WindowedContext
- Definition Classes
- DoFn
- abstract class StartBundleContext extends AnyRef
- Definition Classes
- DoFn
- abstract class WindowedContext extends AnyRef
- Definition Classes
- DoFn
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closeResource(resource: RateLimiter): Unit
Close resource.
Close resource.
Default implementation closes
AutoCloseable
resource.- Definition Classes
- DoFnWithResource
- def createResource(): RateLimiter
Create resource.
Create resource.
DoFnWithResource#getResourceType()
determines how many times this is called.- Definition Classes
- RateLimiterDoFn → DoFnWithResource
- Annotations
- @Override()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getInputTypeDescriptor(): TypeDescriptor[InputT]
- Definition Classes
- DoFn
- def getOutputTypeDescriptor(): TypeDescriptor[InputT]
- Definition Classes
- DoFn
- def getResource(): RateLimiter
Get managed resource.
Get managed resource.
- Definition Classes
- DoFnWithResource
- Annotations
- @SuppressWarnings()
- def getResourceType(): ResourceType
Get resource type.
Get resource type.
- Definition Classes
- RateLimiterDoFn → DoFnWithResource
- Annotations
- @Override()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def populateDisplayData(builder: Builder): Unit
- Definition Classes
- DoFnWithResource → DoFn → HasDisplayData
- Annotations
- @Override()
- def processElement(element: InputT, out: OutputReceiver[InputT]): Unit
- Annotations
- @ProcessElement()
- def setup(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Setup()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def teardown(): Unit
- Definition Classes
- DoFnWithResource
- Annotations
- @Teardown()
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()