class BatchDoFn[InputT] extends DoFn[InputT, Iterable[InputT]]

Batches input into a desired batch size.

Elements are buffered until there are enough elements for a batch, at which point they are emitted to the output PCollection

Windows are preserved (batches contain elements from the same window). Batches are not spanning over bundles. Once a bundle is finished, the batch is emitted even if not full. This function can only batch 10 parallel windows. If new element comes from an 11th window, the bigger batch will be emitted to give room for this new element.

Source
BatchDoFn.java
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BatchDoFn
  2. DoFn
  3. HasDisplayData
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BatchDoFn(maxWeight: Long, weigher: SerializableFunction[InputT, Long], maxLiveWindows: Int)
  2. new BatchDoFn(maxWeight: Long, weigher: SerializableFunction[InputT, Long])

Type Members

  1. abstract class FinishBundleContext extends AnyRef
    Definition Classes
    DoFn
  2. abstract class OnTimerContext extends WindowedContext
    Definition Classes
    DoFn
  3. abstract class OnWindowExpirationContext extends WindowedContext
    Definition Classes
    DoFn
  4. abstract class ProcessContext extends WindowedContext
    Definition Classes
    DoFn
  5. abstract class StartBundleContext extends AnyRef
    Definition Classes
    DoFn
  6. abstract class WindowedContext extends AnyRef
    Definition Classes
    DoFn

Abstract Value Members

  1. abstract object FinishBundleContext
    Definition Classes
    DoFn
  2. abstract object ProcessContext
    Definition Classes
    DoFn
  3. abstract object StartBundleContext
    Definition Classes
    DoFn
  4. abstract object WindowedContext
    Definition Classes
    DoFn

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def finishBundle(context: FinishBundleContext): Unit
    Annotations
    @FinishBundle()
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def getInputTypeDescriptor(): TypeDescriptor[InputT]
    Definition Classes
    DoFn
  12. def getOutputTypeDescriptor(): TypeDescriptor[Iterable[InputT]]
    Definition Classes
    DoFn
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def populateDisplayData(builder: Builder): Unit
    Definition Classes
    DoFn → HasDisplayData
  19. def processElement(element: InputT, window: BoundedWindow, out: OutputReceiver[Iterable[InputT]]): Unit
    Annotations
    @ProcessElement()
  20. def setup(): Unit
    Annotations
    @Setup()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def getAllowedTimestampSkew(): Duration
    Definition Classes
    DoFn
    Annotations
    @Deprecated
    Deprecated
  2. final def prepareForProcessing(): Unit
    Definition Classes
    DoFn
    Annotations
    @Deprecated
    Deprecated

Inherited from DoFn[InputT, Iterable[InputT]]

Inherited from HasDisplayData

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped