Class IsmFormat.IsmRecord<V>

java.lang.Object
org.apache.beam.runners.dataflow.internal.IsmFormat.IsmRecord<V>
Enclosing class:
IsmFormat

public abstract static class IsmFormat.IsmRecord<V> extends Object
A record containing a composite key and either a value or metadata. The composite key must not contain the metadata key component place holder if producing a value record, and must contain the metadata component key place holder if producing a metadata record.

The composite key is a fixed number of component keys where the first N component keys are used to create a shard id via hashing. See IsmFormat.IsmRecordCoder.hash(List) for further details.

  • Method Details

    • of

      public static <V> IsmFormat.IsmRecord<V> of(List<?> keyComponents, V value)
      Returns an IsmRecord with the specified key components and value.
    • meta

      public static <V> IsmFormat.IsmRecord<V> meta(List<?> keyComponents, byte[] metadata)
    • getKeyComponents

      public List<?> getKeyComponents()
      Returns the list of key components.
    • getKeyComponent

      public Object getKeyComponent(int index)
      Returns the key component at the specified index.
    • getValue

      public V getValue()
      Returns the value. Throws IllegalStateException if this is not a value record.
    • getMetadata

      public byte[] getMetadata()
      Returns the metadata. Throws IllegalStateException if this is not a metadata record.