public abstract static class CassandraIO.Mutate<T> extends PTransform<PCollection<T>,PDone>
PTransform
to mutate into Apache Cassandra. See CassandraIO
for details on
usage and configuration.name
Constructor and Description |
---|
Mutate() |
Modifier and Type | Method and Description |
---|---|
PDone |
expand(PCollection<T> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
void |
validate(PipelineOptions pipelineOptions)
Called before running the Pipeline to verify this transform is fully and correctly specified.
|
CassandraIO.Mutate<T> |
withCassandraService(org.apache.beam.sdk.io.cassandra.CassandraService<T> cassandraService)
Specify the
CassandraService used to connect and write into the Cassandra database. |
CassandraIO.Mutate<T> |
withConsistencyLevel(java.lang.String consistencyLevel) |
CassandraIO.Mutate<T> |
withEntity(java.lang.Class<T> entity)
Specify the entity class in the input
PCollection . |
CassandraIO.Mutate<T> |
withHosts(java.util.List<java.lang.String> hosts)
Specify the Cassandra instance hosts where to write data.
|
CassandraIO.Mutate<T> |
withKeyspace(java.lang.String keyspace)
Specify the Cassandra keyspace where to write data.
|
CassandraIO.Mutate<T> |
withLocalDc(java.lang.String localDc)
Specify the local DC used by the load balancing policy.
|
CassandraIO.Mutate<T> |
withPassword(java.lang.String password)
Specify the password used for authentication.
|
CassandraIO.Mutate<T> |
withPort(int port)
Specify the Cassandra instance port number where to write data.
|
CassandraIO.Mutate<T> |
withUsername(java.lang.String username)
Specify the username used for authentication.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString
public CassandraIO.Mutate<T> withHosts(java.util.List<java.lang.String> hosts)
public CassandraIO.Mutate<T> withPort(int port)
public CassandraIO.Mutate<T> withKeyspace(java.lang.String keyspace)
public CassandraIO.Mutate<T> withEntity(java.lang.Class<T> entity)
PCollection
. The CassandraIO
will map
this entity to the Cassandra table thanks to the annotations.public CassandraIO.Mutate<T> withUsername(java.lang.String username)
public CassandraIO.Mutate<T> withPassword(java.lang.String password)
public CassandraIO.Mutate<T> withLocalDc(java.lang.String localDc)
public CassandraIO.Mutate<T> withConsistencyLevel(java.lang.String consistencyLevel)
public CassandraIO.Mutate<T> withCassandraService(org.apache.beam.sdk.io.cassandra.CassandraService<T> cassandraService)
CassandraService
used to connect and write into the Cassandra database.public void validate(PipelineOptions pipelineOptions)
PTransform
By default, does nothing.
validate
in class PTransform<PCollection<T>,PDone>
public PDone expand(PCollection<T> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
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).
expand
in class PTransform<PCollection<T>,PDone>