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 java.lang.ObjectA 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
Ncomponent keys are used to create a shard id via hashing. SeeIsmFormat.IsmRecordCoder.hash(List)for further details.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetKeyComponent(int index)Returns the key component at the specified index.java.util.List<?>getKeyComponents()Returns the list of key components.byte[]getMetadata()Returns the metadata.VgetValue()Returns the value.static <V> IsmFormat.IsmRecord<V>meta(java.util.List<?> keyComponents, byte[] metadata)static <V> IsmFormat.IsmRecord<V>of(java.util.List<?> keyComponents, V value)Returns an IsmRecord with the specified key components and value.
-
-
-
Method Detail
-
of
public static <V> IsmFormat.IsmRecord<V> of(java.util.List<?> keyComponents, V value)
Returns an IsmRecord with the specified key components and value.
-
meta
public static <V> IsmFormat.IsmRecord<V> meta(java.util.List<?> keyComponents, byte[] metadata)
-
getKeyComponents
public java.util.List<?> getKeyComponents()
Returns the list of key components.
-
getKeyComponent
public java.lang.Object getKeyComponent(int index)
Returns the key component at the specified index.
-
getValue
public V getValue()
Returns the value. ThrowsIllegalStateExceptionif this is not a value record.
-
getMetadata
public byte[] getMetadata()
Returns the metadata. ThrowsIllegalStateExceptionif this is not a metadata record.
-
-