public abstract static class CassandraIO.Read<T>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<T>>
PTransform to read data from Apache Cassandra. See CassandraIO for more
information on usage and configuration.| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<T> |
expand(org.apache.beam.sdk.values.PBegin input) |
CassandraIO.Read<T> |
withCoder(org.apache.beam.sdk.coders.Coder<T> coder)
Specify the
Coder used to serialize the entity in the PCollection. |
CassandraIO.Read<T> |
withConsistencyLevel(java.lang.String consistencyLevel) |
CassandraIO.Read<T> |
withConsistencyLevel(org.apache.beam.sdk.options.ValueProvider<java.lang.String> consistencyLevel) |
CassandraIO.Read<T> |
withEntity(java.lang.Class<T> entity)
Specify the entity class (annotated POJO).
|
CassandraIO.Read<T> |
withHosts(java.util.List<java.lang.String> hosts)
Specify the hosts of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withHosts(org.apache.beam.sdk.options.ValueProvider<java.util.List<java.lang.String>> hosts)
Specify the hosts of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withKeyspace(java.lang.String keyspace)
Specify the Cassandra keyspace where to read data.
|
CassandraIO.Read<T> |
withKeyspace(org.apache.beam.sdk.options.ValueProvider<java.lang.String> keyspace)
Specify the Cassandra keyspace where to read data.
|
CassandraIO.Read<T> |
withLocalDc(java.lang.String localDc)
Specify the local DC used for the load balancing.
|
CassandraIO.Read<T> |
withLocalDc(org.apache.beam.sdk.options.ValueProvider<java.lang.String> localDc)
Specify the local DC used for the load balancing.
|
CassandraIO.Read<T> |
withMapperFactoryFn(org.apache.beam.sdk.transforms.SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactory)
A factory to create a specific
Mapper for a given Cassandra Session. |
CassandraIO.Read<T> |
withMinNumberOfSplits(java.lang.Integer minNumberOfSplits)
It's possible that system.size_estimates isn't populated or that the number of splits
computed by Beam is still to low for Cassandra to handle it.
|
CassandraIO.Read<T> |
withMinNumberOfSplits(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> minNumberOfSplits)
It's possible that system.size_estimates isn't populated or that the number of splits
computed by Beam is still to low for Cassandra to handle it.
|
CassandraIO.Read<T> |
withPassword(java.lang.String password)
Specify the password used for authentication.
|
CassandraIO.Read<T> |
withPassword(org.apache.beam.sdk.options.ValueProvider<java.lang.String> password)
Specify the password used for authentication.
|
CassandraIO.Read<T> |
withPort(int port)
Specify the port number of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
Specify the port number of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withQuery(java.lang.String query)
Specify the query to read data.
|
CassandraIO.Read<T> |
withQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)
Specify the query to read data.
|
CassandraIO.Read<T> |
withTable(java.lang.String table)
Specify the Cassandra table where to read data.
|
CassandraIO.Read<T> |
withTable(org.apache.beam.sdk.options.ValueProvider<java.lang.String> table)
Specify the Cassandra table where to read data.
|
CassandraIO.Read<T> |
withUsername(java.lang.String username)
Specify the username for authentication.
|
CassandraIO.Read<T> |
withUsername(org.apache.beam.sdk.options.ValueProvider<java.lang.String> username)
Specify the username for authentication.
|
public CassandraIO.Read<T> withHosts(java.util.List<java.lang.String> hosts)
public CassandraIO.Read<T> withHosts(org.apache.beam.sdk.options.ValueProvider<java.util.List<java.lang.String>> hosts)
public CassandraIO.Read<T> withPort(int port)
public CassandraIO.Read<T> withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
public CassandraIO.Read<T> withKeyspace(java.lang.String keyspace)
public CassandraIO.Read<T> withKeyspace(org.apache.beam.sdk.options.ValueProvider<java.lang.String> keyspace)
public CassandraIO.Read<T> withTable(java.lang.String table)
public CassandraIO.Read<T> withTable(org.apache.beam.sdk.options.ValueProvider<java.lang.String> table)
public CassandraIO.Read<T> withQuery(java.lang.String query)
public CassandraIO.Read<T> withQuery(org.apache.beam.sdk.options.ValueProvider<java.lang.String> query)
public CassandraIO.Read<T> withEntity(java.lang.Class<T> entity)
CassandraIO will read the data and
convert the data as entity instances. The PCollection resulting from the read will
contains entity elements.public CassandraIO.Read<T> withCoder(org.apache.beam.sdk.coders.Coder<T> coder)
Coder used to serialize the entity in the PCollection.public CassandraIO.Read<T> withUsername(java.lang.String username)
public CassandraIO.Read<T> withUsername(org.apache.beam.sdk.options.ValueProvider<java.lang.String> username)
public CassandraIO.Read<T> withPassword(java.lang.String password)
public CassandraIO.Read<T> withPassword(org.apache.beam.sdk.options.ValueProvider<java.lang.String> password)
public CassandraIO.Read<T> withLocalDc(java.lang.String localDc)
public CassandraIO.Read<T> withLocalDc(org.apache.beam.sdk.options.ValueProvider<java.lang.String> localDc)
public CassandraIO.Read<T> withConsistencyLevel(java.lang.String consistencyLevel)
public CassandraIO.Read<T> withConsistencyLevel(org.apache.beam.sdk.options.ValueProvider<java.lang.String> consistencyLevel)
public CassandraIO.Read<T> withMinNumberOfSplits(java.lang.Integer minNumberOfSplits)
public CassandraIO.Read<T> withMinNumberOfSplits(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> minNumberOfSplits)
public CassandraIO.Read<T> withMapperFactoryFn(org.apache.beam.sdk.transforms.SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactory)
Mapper for a given Cassandra Session. This is useful
to provide mappers that don't rely in Cassandra annotated objects.