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> |
withConnectTimeout(java.lang.Integer timeout)
Cassandra client socket option for connect timeout in ms.
|
CassandraIO.Write<T> |
withConnectTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
Cassandra client socket option for connect timeout in ms.
|
CassandraIO.Write<T> |
withConsistencyLevel(java.lang.String consistencyLevel)
Specify the consistency level for the request (e.g.
|
CassandraIO.Write<T> |
withConsistencyLevel(org.apache.beam.sdk.options.ValueProvider<java.lang.String> consistencyLevel)
Specify the consistency level for the request (e.g.
|
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> |
withReadTimeout(java.lang.Integer timeout)
Cassandra client socket option to set the read timeout in ms.
|
CassandraIO.Write<T> |
withReadTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
Cassandra client socket option to set the read timeout in ms.
|
CassandraIO.Write<T> |
withSsl(com.datastax.driver.core.SSLOptions sslOptions)
Optionally, specify
SSLOptions configuration to utilize SSL. |
CassandraIO.Write<T> |
withSsl(org.apache.beam.sdk.options.ValueProvider<com.datastax.driver.core.SSLOptions> sslOptions)
Optionally, specify
SSLOptions configuration to utilize SSL. |
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.
|
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validatepublic 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> withConnectTimeout(java.lang.Integer timeout)
public CassandraIO.Write<T> withConnectTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
public CassandraIO.Write<T> withReadTimeout(java.lang.Integer timeout)
public CassandraIO.Write<T> withReadTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
public CassandraIO.Write<T> withMapperFactoryFn(org.apache.beam.sdk.transforms.SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactoryFn)
public CassandraIO.Write<T> withSsl(com.datastax.driver.core.SSLOptions sslOptions)
SSLOptions configuration to utilize SSL. See
https://docs.datastax.com/en/developer/java-driver/3.11/manual/ssl/#jsse-programmaticpublic CassandraIO.Write<T> withSsl(org.apache.beam.sdk.options.ValueProvider<com.datastax.driver.core.SSLOptions> sslOptions)
SSLOptions configuration to utilize SSL. See
https://docs.datastax.com/en/developer/java-driver/3.11/manual/ssl/#jsse-programmaticpublic 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>