Class CassandraPojoOutputFormat<OUT>
- java.lang.Object
-
- org.apache.flink.api.common.io.RichOutputFormat<OUT>
-
- org.apache.flink.api.common.io.OutputFormatBase<OUT,V>
-
- org.apache.flink.batch.connectors.cassandra.CassandraPojoOutputFormat<OUT>
-
- Type Parameters:
OUT
- type of outputClass
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.io.OutputFormat<OUT>
public class CassandraPojoOutputFormat<OUT> extends org.apache.flink.api.common.io.OutputFormatBase<OUT,V>
OutputFormat to write data to Apache Cassandra and from a custom Cassandra annotated object. Please read the recommendations in CassandraOutputFormatBase.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.datastax.driver.core.Session
session
-
Constructor Summary
Constructors Constructor Description CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass)
CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass, MapperOptions mapperOptions)
CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass, MapperOptions mapperOptions, int maxConcurrentRequests, java.time.Duration maxConcurrentRequestsTimeout)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.apache.flink.configuration.Configuration parameters)
Configure the connection to Cassandra.protected static <T> CompletableFuture<T>
listenableFutureToCompletableFuture(com.google.common.util.concurrent.ListenableFuture<T> listenableFuture)
protected void
postClose()
Closes all resources used.protected void
postOpen()
Opens a Session to Cassandra and initializes the prepared statement.protected CompletionStage<Void>
send(OUT record)
-
Methods inherited from class org.apache.flink.api.common.io.OutputFormatBase
close, open, writeRecord
-
-
-
-
Constructor Detail
-
CassandraPojoOutputFormat
public CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass)
-
CassandraPojoOutputFormat
public CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass, MapperOptions mapperOptions)
-
CassandraPojoOutputFormat
public CassandraPojoOutputFormat(ClusterBuilder builder, Class<OUT> outputClass, MapperOptions mapperOptions, int maxConcurrentRequests, java.time.Duration maxConcurrentRequestsTimeout)
-
-
Method Detail
-
postOpen
protected void postOpen()
Opens a Session to Cassandra and initializes the prepared statement.
-
send
protected CompletionStage<Void> send(OUT record)
-
postClose
protected void postClose()
Closes all resources used.
-
configure
public void configure(org.apache.flink.configuration.Configuration parameters)
Configure the connection to Cassandra.
-
listenableFutureToCompletableFuture
protected static <T> CompletableFuture<T> listenableFutureToCompletableFuture(com.google.common.util.concurrent.ListenableFuture<T> listenableFuture)
-
-