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 mutate 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> |
withConsistencyLevel(java.lang.String consistencyLevel) |
CassandraIO.Write<T> |
withConsistencyLevel(org.apache.beam.sdk.options.ValueProvider<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> |
withHosts(org.apache.beam.sdk.options.ValueProvider<java.util.List<java.lang.String>> hosts)
Specify the hosts of the Apache Cassandra instances.
|
CassandraIO.Write<T> |
withKeyspace(java.lang.String keyspace)
Specify the Cassandra keyspace where to write data.
|
CassandraIO.Write<T> |
withKeyspace(org.apache.beam.sdk.options.ValueProvider<java.lang.String> keyspace)
Specify the Cassandra keyspace where to read data.
|
CassandraIO.Write<T> |
withLocalDc(java.lang.String localDc)
Specify the local DC used by the load balancing policy.
|
CassandraIO.Write<T> |
withLocalDc(org.apache.beam.sdk.options.ValueProvider<java.lang.String> localDc)
Specify the local DC used for the load balancing.
|
CassandraIO.Write<T> |
withMapperFactoryFn(org.apache.beam.sdk.transforms.SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactoryFn) |
CassandraIO.Write<T> |
withPassword(java.lang.String password)
Specify the password used for authentication.
|
CassandraIO.Write<T> |
withPassword(org.apache.beam.sdk.options.ValueProvider<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> |
withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
Specify the port number of the Apache Cassandra instances.
|
CassandraIO.Write<T> |
withUsername(java.lang.String username)
Specify the username used for authentication.
|
CassandraIO.Write<T> |
withUsername(org.apache.beam.sdk.options.ValueProvider<java.lang.String> username)
Specify the username for authentication.
|
public CassandraIO.Write<T> withHosts(java.util.List<java.lang.String> hosts)
public CassandraIO.Write<T> withHosts(org.apache.beam.sdk.options.ValueProvider<java.util.List<java.lang.String>> hosts)
public CassandraIO.Write<T> withPort(int port)
public CassandraIO.Write<T> withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
public CassandraIO.Write<T> withKeyspace(java.lang.String keyspace)
public CassandraIO.Write<T> withKeyspace(org.apache.beam.sdk.options.ValueProvider<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> withUsername(org.apache.beam.sdk.options.ValueProvider<java.lang.String> username)
public CassandraIO.Write<T> withPassword(java.lang.String password)
public CassandraIO.Write<T> withPassword(org.apache.beam.sdk.options.ValueProvider<java.lang.String> password)
public CassandraIO.Write<T> withLocalDc(java.lang.String localDc)
public CassandraIO.Write<T> withLocalDc(org.apache.beam.sdk.options.ValueProvider<java.lang.String> localDc)
public CassandraIO.Write<T> withConsistencyLevel(java.lang.String consistencyLevel)
public CassandraIO.Write<T> withConsistencyLevel(org.apache.beam.sdk.options.ValueProvider<java.lang.String> consistencyLevel)
public CassandraIO.Write<T> withMapperFactoryFn(org.apache.beam.sdk.transforms.SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactoryFn)
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>