Class ExternalStateExpander


  • public class ExternalStateExpander
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.beam.sdk.Pipeline expand​(org.apache.beam.sdk.Pipeline pipeline, org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,​org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​StateValue>>> inputs, org.joda.time.Instant stateWriteInstant, UnaryFunction<org.joda.time.Instant,​org.joda.time.Instant> nextFlushInstantFn, org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​StateValue>>,​org.apache.beam.sdk.values.PDone> stateSink)
      Expand the given @{link Pipeline} to support external state store and restore
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • expand

        public static org.apache.beam.sdk.Pipeline expand​(org.apache.beam.sdk.Pipeline pipeline,
                                                          org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,​org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​StateValue>>> inputs,
                                                          org.joda.time.Instant stateWriteInstant,
                                                          UnaryFunction<org.joda.time.Instant,​org.joda.time.Instant> nextFlushInstantFn,
                                                          org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,​StateValue>>,​org.apache.beam.sdk.values.PDone> stateSink)
                                                   throws java.io.IOException
        Expand the given @{link Pipeline} to support external state store and restore
        Parameters:
        pipeline - the Pipeline to expand
        inputs - transform to read inputs
        stateWriteInstant - the instant at which write of the last state occurred
        nextFlushInstantFn - function that returns instant of next flush from current time
        stateSink - transform to store outputs
        Throws:
        java.io.IOException