public abstract static class CassandraIO.Write<T> extends PTransform<PCollection<T>,PDone>
PTransform
to mutate 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)
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.Write<T> |
withConsistencyLevel(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> |
withKeyspace(java.lang.String keyspace)
Specify the Cassandra keyspace where to write data.
|
CassandraIO.Write<T> |
withLocalDc(java.lang.String localDc)
Specify the local DC used by the load balancing policy.
|
CassandraIO.Write<T> |
withMapperFactoryFn(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> |
withPort(int port)
Specify the Cassandra instance port number where to write data.
|
CassandraIO.Write<T> |
withUsername(java.lang.String username)
Specify the username used for authentication.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString
public CassandraIO.Write<T> withHosts(java.util.List<java.lang.String> hosts)
public CassandraIO.Write<T> withPort(int port)
public CassandraIO.Write<T> withKeyspace(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> withPassword(java.lang.String password)
public CassandraIO.Write<T> withLocalDc(java.lang.String localDc)
public CassandraIO.Write<T> withConsistencyLevel(java.lang.String consistencyLevel)
public CassandraIO.Write<T> withMapperFactoryFn(SerializableFunction<com.datastax.driver.core.Session,Mapper> mapperFactoryFn)
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>