Package org.apache.beam.sdk.io.cassandra
Class CassandraIO.Write<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PDone>
org.apache.beam.sdk.io.cassandra.CassandraIO.Write<T>
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
CassandraIO
A
PTransform to mutate into Apache Cassandra. See CassandraIO for details on
usage and configuration.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand(PCollection<T> input) Override this method to specify how thisPTransformshould be expanded on the givenInputT.voidvalidate(PipelineOptions pipelineOptions) Called before running the Pipeline to verify this transform is fully and correctly specified.withConnectTimeout(Integer timeout) Cassandra client socket option for connect timeout in ms.withConnectTimeout(ValueProvider<Integer> timeout) Cassandra client socket option for connect timeout in ms.withConsistencyLevel(String consistencyLevel) Specify the consistency level for the request (e.g.withConsistencyLevel(ValueProvider<String> consistencyLevel) Specify the consistency level for the request (e.g.withEntity(Class<T> entity) Specify the entity class in the inputPCollection.Specify the Cassandra instance hosts where to write data.withHosts(ValueProvider<List<String>> hosts) Specify the hosts of the Apache Cassandra instances.withKeyspace(String keyspace) Specify the Cassandra keyspace where to write data.withKeyspace(ValueProvider<String> keyspace) Specify the Cassandra keyspace where to read data.withLocalDc(String localDc) Specify the local DC used by the load balancing policy.withLocalDc(ValueProvider<String> localDc) Specify the local DC used for the load balancing.withMapperFactoryFn(SerializableFunction<Session, Mapper> mapperFactoryFn) withPassword(String password) Specify the password used for authentication.withPassword(ValueProvider<String> password) Specify the password used for authentication.withPort(int port) Specify the Cassandra instance port number where to write data.withPort(ValueProvider<Integer> port) Specify the port number of the Apache Cassandra instances.withReadTimeout(Integer timeout) Cassandra client socket option to set the read timeout in ms.withReadTimeout(ValueProvider<Integer> timeout) Cassandra client socket option to set the read timeout in ms.withSsl(SSLOptions sslOptions) Optionally, specifySSLOptionsconfiguration to utilize SSL.withSsl(ValueProvider<SSLOptions> sslOptions) Optionally, specifySSLOptionsconfiguration to utilize SSL.withUsername(String username) Specify the username used for authentication.withUsername(ValueProvider<String> username) Specify the username for authentication.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate
-
Constructor Details
-
Write
public Write()
-
-
Method Details
-
withHosts
Specify the Cassandra instance hosts where to write data. -
withHosts
Specify the hosts of the Apache Cassandra instances. -
withPort
Specify the Cassandra instance port number where to write data. -
withPort
Specify the port number of the Apache Cassandra instances. -
withKeyspace
Specify the Cassandra keyspace where to write data. -
withKeyspace
Specify the Cassandra keyspace where to read data. -
withEntity
Specify the entity class in the inputPCollection. TheCassandraIOwill map this entity to the Cassandra table thanks to the annotations. -
withUsername
Specify the username used for authentication. -
withUsername
Specify the username for authentication. -
withPassword
Specify the password used for authentication. -
withPassword
Specify the password used for authentication. -
withLocalDc
Specify the local DC used by the load balancing policy. -
withLocalDc
Specify the local DC used for the load balancing. -
withConsistencyLevel
Specify the consistency level for the request (e.g. ONE, LOCAL_ONE, LOCAL_QUORUM, etc). -
withConsistencyLevel
Specify the consistency level for the request (e.g. ONE, LOCAL_ONE, LOCAL_QUORUM, etc). -
withConnectTimeout
Cassandra client socket option for connect timeout in ms. -
withConnectTimeout
Cassandra client socket option for connect timeout in ms. -
withReadTimeout
Cassandra client socket option to set the read timeout in ms. -
withReadTimeout
Cassandra client socket option to set the read timeout in ms. -
withMapperFactoryFn
public CassandraIO.Write<T> withMapperFactoryFn(SerializableFunction<Session, Mapper> mapperFactoryFn) -
withSsl
Optionally, specifySSLOptionsconfiguration to utilize SSL. See https://docs.datastax.com/en/developer/java-driver/3.11/manual/ssl/#jsse-programmatic -
withSsl
Optionally, specifySSLOptionsconfiguration to utilize SSL. See https://docs.datastax.com/en/developer/java-driver/3.11/manual/ssl/#jsse-programmatic -
validate
Description copied from class:PTransformCalled before running the Pipeline to verify this transform is fully and correctly specified.By default, does nothing.
- Overrides:
validatein classPTransform<PCollection<T>,PDone>
-
expand
Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PCollection<T>,PDone>
-