K - Type of keys to be read.V - Type of values to be read.public abstract static class HadoopFormatIO.Read<K,V>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>>>
PTransform that reads from any data source which implements Hadoop InputFormat. For
e.g. Cassandra, Elasticsearch, HBase, Redis, Postgres, etc. See the class-level Javadoc on
HadoopFormatIO for more information.HadoopFormatIO,
Serialized Form| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>> |
expand(org.apache.beam.sdk.values.PBegin input) |
abstract @Nullable org.apache.beam.sdk.io.hadoop.SerializableConfiguration |
getConfiguration() |
<T> org.apache.beam.sdk.coders.Coder<T> |
getDefaultCoder(org.apache.beam.sdk.values.TypeDescriptor<?> typeDesc,
org.apache.beam.sdk.coders.CoderRegistry coderRegistry)
Returns the default coder for a given type descriptor.
|
abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> |
getinputFormatClass() |
abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> |
getinputFormatKeyClass() |
abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> |
getinputFormatValueClass() |
abstract @Nullable org.apache.beam.sdk.coders.Coder<K> |
getKeyCoder() |
abstract @Nullable org.apache.beam.sdk.transforms.SimpleFunction<?,K> |
getKeyTranslationFunction() |
abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<K> |
getKeyTypeDescriptor() |
abstract @Nullable java.lang.Boolean |
getSkipKeyClone() |
abstract @Nullable java.lang.Boolean |
getSkipValueClone() |
abstract @Nullable org.apache.beam.sdk.coders.Coder<V> |
getValueCoder() |
abstract @Nullable org.apache.beam.sdk.transforms.SimpleFunction<?,V> |
getValueTranslationFunction() |
abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<V> |
getValueTypeDescriptor() |
abstract org.apache.beam.sdk.io.hadoop.format.HadoopFormatIO.Read.Builder<K,V> |
toBuilder() |
void |
validateTransform()
Validates construction of this transform.
|
HadoopFormatIO.Read<K,V> |
withConfiguration(org.apache.hadoop.conf.Configuration configuration)
Reads from the source using the options provided by the given configuration.
|
HadoopFormatIO.Read<K,V> |
withKeyTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,K> function)
Transforms the keys read from the source using the given key translation function.
|
HadoopFormatIO.Read<K,V> |
withKeyTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,K> function,
org.apache.beam.sdk.coders.Coder<K> coder)
Transforms the keys read from the source using the given key translation function.
|
HadoopFormatIO.Read<K,V> |
withSkipKeyClone(boolean value)
Determines if key clone should be skipped or not (default is 'false').
|
HadoopFormatIO.Read<K,V> |
withSkipValueClone(boolean value)
Determines if value clone should be skipped or not (default is 'false').
|
HadoopFormatIO.Read<K,V> |
withValueTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,V> function)
Transforms the values read from the source using the given value translation function.
|
HadoopFormatIO.Read<K,V> |
withValueTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,V> function,
org.apache.beam.sdk.coders.Coder<V> coder)
Transforms the values read from the source using the given value translation function.
|
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validatepublic abstract @Nullable org.apache.beam.sdk.io.hadoop.SerializableConfiguration getConfiguration()
public abstract @Nullable org.apache.beam.sdk.transforms.SimpleFunction<?,K> getKeyTranslationFunction()
public abstract @Nullable org.apache.beam.sdk.transforms.SimpleFunction<?,V> getValueTranslationFunction()
public abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<K> getKeyTypeDescriptor()
public abstract @Nullable org.apache.beam.sdk.coders.Coder<K> getKeyCoder()
public abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<V> getValueTypeDescriptor()
public abstract @Nullable org.apache.beam.sdk.coders.Coder<V> getValueCoder()
public abstract @Nullable java.lang.Boolean getSkipKeyClone()
public abstract @Nullable java.lang.Boolean getSkipValueClone()
public abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> getinputFormatClass()
public abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> getinputFormatKeyClass()
public abstract @Nullable org.apache.beam.sdk.values.TypeDescriptor<?> getinputFormatValueClass()
public abstract org.apache.beam.sdk.io.hadoop.format.HadoopFormatIO.Read.Builder<K,V> toBuilder()
public HadoopFormatIO.Read<K,V> withConfiguration(org.apache.hadoop.conf.Configuration configuration)
public HadoopFormatIO.Read<K,V> withKeyTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,K> function)
public HadoopFormatIO.Read<K,V> withKeyTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,K> function, org.apache.beam.sdk.coders.Coder<K> coder)
public HadoopFormatIO.Read<K,V> withValueTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,V> function)
public HadoopFormatIO.Read<K,V> withValueTranslation(org.apache.beam.sdk.transforms.SimpleFunction<?,V> function, org.apache.beam.sdk.coders.Coder<V> coder)
public HadoopFormatIO.Read<K,V> withSkipKeyClone(boolean value)
public HadoopFormatIO.Read<K,V> withSkipValueClone(boolean value)
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<K,V>> expand(org.apache.beam.sdk.values.PBegin input)
public void validateTransform()
public <T> org.apache.beam.sdk.coders.Coder<T> getDefaultCoder(org.apache.beam.sdk.values.TypeDescriptor<?> typeDesc,
org.apache.beam.sdk.coders.CoderRegistry coderRegistry)