Class Utils

java.lang.Object
org.apache.beam.runners.jet.Utils

public class Utils extends Object
Various common methods used by the Jet based runner.
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getTupleTagId

      public static String getTupleTagId(PValue value)
    • roundRobinSubList

      @Nonnull public static <T> List<T> roundRobinSubList(@Nonnull List<T> list, int index, int count)
      Assigns the list to count sublists in a round-robin fashion. One call returns the index-th sublist.

      For example, for a 7-element list where count == 3, it would respectively return for indices 0..2:

         0, 3, 6
         1, 4
         2, 5
       
    • serde

      public static <T> T serde(T object)
      Returns a deep clone of an object by serializing and deserializing it (ser-de).
    • encode

      public static <T> byte[] encode(T value, Coder<T> coder)
    • decodeWindowedValue

      public static <T> WindowedValue<T> decodeWindowedValue(byte[] item, Coder coder)
    • deriveIterableValueCoder

      public static WindowedValues.FullWindowedValueCoder deriveIterableValueCoder(WindowedValues.FullWindowedValueCoder elementCoder)