public abstract static class CassandraIO.Read<T> extends PTransform<PBegin,PCollection<T>>
PTransform to read data from Apache Cassandra. See CassandraIO for more
information on usage and configuration.name| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
expand(PBegin input) |
CassandraIO.Read<T> |
withCassandraService(CassandraService<T> cassandraService)
Specify an instance of
CassandraService used to connect and read from Cassandra
database. |
CassandraIO.Read<T> |
withCoder(Coder<T> coder)
Specify the
Coder used to serialize the entity in the PCollection. |
CassandraIO.Read<T> |
withConsistencyLevel(String consistencyLevel) |
CassandraIO.Read<T> |
withEntity(Class<T> entity)
Specify the entity class (annotated POJO).
|
CassandraIO.Read<T> |
withHosts(List<String> hosts)
Specify the hosts of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withKeyspace(String keyspace)
Specify the Cassandra keyspace where to read data.
|
CassandraIO.Read<T> |
withLocalDc(String localDc)
Specify the local DC used for the load balancing.
|
CassandraIO.Read<T> |
withPassword(String password)
Specify the password for authentication.
|
CassandraIO.Read<T> |
withPort(int port)
Specify the port number of the Apache Cassandra instances.
|
CassandraIO.Read<T> |
withTable(String table)
Specify the Cassandra table where to read data.
|
CassandraIO.Read<T> |
withUsername(String username)
Specify the username for authentication.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic CassandraIO.Read<T> withHosts(List<String> hosts)
public CassandraIO.Read<T> withPort(int port)
public CassandraIO.Read<T> withKeyspace(String keyspace)
public CassandraIO.Read<T> withTable(String table)
public CassandraIO.Read<T> withEntity(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(Coder<T> coder)
Coder used to serialize the entity in the PCollection.public CassandraIO.Read<T> withUsername(String username)
public CassandraIO.Read<T> withPassword(String password)
public CassandraIO.Read<T> withLocalDc(String localDc)
public CassandraIO.Read<T> withConsistencyLevel(String consistencyLevel)
public CassandraIO.Read<T> withCassandraService(CassandraService<T> cassandraService)
CassandraService used to connect and read from Cassandra
database.public PCollection<T> expand(PBegin input)
expand in class PTransform<PBegin,PCollection<T>>Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.