public abstract static class CassandraIO.Write<T> extends PTransform<PCollection<T>,PDone>
PTransform to write into Apache Cassandra. See CassandraIO for details on
usage and configuration.name| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
PDone |
expand(PCollection<T> input) |
void |
validate(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(String consistencyLevel) |
CassandraIO.Write<T> |
withEntity(Class<T> entity)
Specify the entity class in the input
PCollection. |
CassandraIO.Write<T> |
withHosts(List<String> hosts)
Specify the Cassandra instance hosts where to write data.
|
CassandraIO.Write<T> |
withKeyspace(String keyspace)
Specify the Cassandra keyspace where to write data.
|
CassandraIO.Write<T> |
withLocalDc(String localDc)
Specify the local DC used by the load balancing policy.
|
CassandraIO.Write<T> |
withPassword(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(String username)
Specify the username used for authentication.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toStringpublic CassandraIO.Write<T> withHosts(List<String> hosts)
public CassandraIO.Write<T> withPort(int port)
public CassandraIO.Write<T> withKeyspace(String keyspace)
public CassandraIO.Write<T> withEntity(Class<T> entity)
PCollection. The CassandraIO will
map this entity to the Cassandra table thanks to the annotations.public CassandraIO.Write<T> withUsername(String username)
public CassandraIO.Write<T> withPassword(String password)
public CassandraIO.Write<T> withLocalDc(String localDc)
public CassandraIO.Write<T> withConsistencyLevel(String consistencyLevel)
public CassandraIO.Write<T> withCassandraService(CassandraService<T> cassandraService)
CassandraService used to connect and write into the Cassandra database.public void validate(PipelineOptions pipelineOptions)
validate in class PTransform<PCollection<T>,PDone>public PDone expand(PCollection<T> input)
expand in class PTransform<PCollection<T>,PDone>Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.