public static class BigQueryIO.ShardedKeyCoder<KeyT> extends StandardCoder<com.google.cloud.dataflow.sdk.io.BigQueryIO.ShardedKey<KeyT>>
Coder.Context, Coder.NonDeterministicException| Modifier | Constructor and Description |
|---|---|
protected |
ShardedKeyCoder(Coder<KeyT> keyCoder) |
| Modifier and Type | Method and Description |
|---|---|
com.google.cloud.dataflow.sdk.io.BigQueryIO.ShardedKey<KeyT> |
decode(InputStream inStream,
Coder.Context context)
Decodes a value of type
T from the given input stream in
the given context. |
void |
encode(com.google.cloud.dataflow.sdk.io.BigQueryIO.ShardedKey<KeyT> key,
OutputStream outStream,
Coder.Context context)
Encodes the given value of type
T onto the given output stream
in the given context. |
List<? extends Coder<?>> |
getCoderArguments()
If this is a
Coder for a parameterized type, returns the
list of Coders being used for each of the parameters, or
returns null if this cannot be done or this is not a
parameterized type. |
static <KeyT> BigQueryIO.ShardedKeyCoder<KeyT> |
of(Coder<KeyT> keyCoder) |
static <KeyT> BigQueryIO.ShardedKeyCoder<KeyT> |
of(List<Coder<KeyT>> components) |
void |
verifyDeterministic()
Throw
Coder.NonDeterministicException if the coding is not deterministic. |
asCloudObject, consistentWithEquals, equals, getAllowedEncodings, getComponents, getEncodedElementByteSize, getEncodingId, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, toString, verifyDeterministic, verifyDeterministicpublic static <KeyT> BigQueryIO.ShardedKeyCoder<KeyT> of(Coder<KeyT> keyCoder)
public static <KeyT> BigQueryIO.ShardedKeyCoder<KeyT> of(List<Coder<KeyT>> components)
public List<? extends Coder<?>> getCoderArguments()
CoderCoder for a parameterized type, returns the
list of Coders being used for each of the parameters, or
returns null if this cannot be done or this is not a
parameterized type.public void encode(com.google.cloud.dataflow.sdk.io.BigQueryIO.ShardedKey<KeyT> key, OutputStream outStream, Coder.Context context) throws IOException
CoderT onto the given output stream
in the given context.IOException - if writing to the OutputStream fails
for some reasonCoderException - if the value could not be encoded for some reasonpublic com.google.cloud.dataflow.sdk.io.BigQueryIO.ShardedKey<KeyT> decode(InputStream inStream, Coder.Context context) throws IOException
CoderT from the given input stream in
the given context. Returns the decoded value.IOException - if reading from the InputStream fails
for some reasonCoderException - if the value could not be decoded for some reasonpublic void verifyDeterministic()
throws Coder.NonDeterministicException
CoderCoder.NonDeterministicException if the coding is not deterministic.
In order for a Coder to be considered deterministic,
the following must be true:
Object.equals()
or Comparable.compareTo(), if supported) have the same
encoding.
Coder always produces a canonical encoding, which is the
same for an instance of an object even if produced on different
computers at different times.
Coder.NonDeterministicException - if this coder is not deterministic.