public abstract static class CassandraIO.Write<T>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.values.PDone>
PTransform to write into Apache Cassandra. See CassandraIO for details on
usage and configuration.| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PDone |
expand(org.apache.beam.sdk.values.PCollection<T> input) |
void |
validate(org.apache.beam.sdk.options.PipelineOptions pipelineOptions) |
CassandraIO.Write<T> |
withCassandraService(CassandraService<T> cassandraService)
Specify the
CassandraService used to connect and write into the Cassandra database. |
CassandraIO.Write<T> |
withConsistencyLevel(java.lang.String consistencyLevel) |
CassandraIO.Write<T> |
withEntity(java.lang.Class<T> entity)
Specify the entity class in the input
PCollection. |
CassandraIO.Write<T> |
withHosts(java.util.List<java.lang.String> hosts)
Specify the Cassandra instance hosts where to write data.
|
CassandraIO.Write<T> |
withKeyspace(java.lang.String keyspace)
Specify the Cassandra keyspace where to write data.
|
CassandraIO.Write<T> |
withLocalDc(java.lang.String localDc)
Specify the local DC used by the load balancing policy.
|
CassandraIO.Write<T> |
withPassword(java.lang.String password)
Specify the password used for authentication.
|
CassandraIO.Write<T> |
withPort(int port)
Specify the Cassandra instance port number where to write data.
|
CassandraIO.Write<T> |
withUsername(java.lang.String username)
Specify the username used for authentication.
|
public CassandraIO.Write<T> withHosts(java.util.List<java.lang.String> hosts)
public CassandraIO.Write<T> withPort(int port)
public CassandraIO.Write<T> withKeyspace(java.lang.String keyspace)
public CassandraIO.Write<T> withEntity(java.lang.Class<T> entity)
PCollection. The CassandraIO will
map this entity to the Cassandra table thanks to the annotations.public CassandraIO.Write<T> withUsername(java.lang.String username)
public CassandraIO.Write<T> withPassword(java.lang.String password)
public CassandraIO.Write<T> withLocalDc(java.lang.String localDc)
public CassandraIO.Write<T> withConsistencyLevel(java.lang.String consistencyLevel)
public CassandraIO.Write<T> withCassandraService(CassandraService<T> cassandraService)
CassandraService used to connect and write into the Cassandra database.public void validate(org.apache.beam.sdk.options.PipelineOptions pipelineOptions)
validate in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.values.PDone>