public class CassandraRowOutputFormat extends OutputFormatBase<OUT,V>
Row
s into a Cassandra cluster. * Please read the
recommendations in CassandraOutputFormatBase.Modifier and Type | Field and Description |
---|---|
protected com.datastax.driver.core.Session |
session |
Constructor and Description |
---|
CassandraRowOutputFormat(String insertQuery,
ClusterBuilder builder) |
CassandraRowOutputFormat(String insertQuery,
ClusterBuilder builder,
int maxConcurrentRequests,
java.time.Duration maxConcurrentRequestsTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration parameters)
Configure the connection to Cassandra.
|
protected Object[] |
extractFields(Row record) |
protected static <T> CompletableFuture<T> |
listenableFutureToCompletableFuture(com.google.common.util.concurrent.ListenableFuture<T> listenableFuture) |
protected void |
postClose()
Closes all resources used by Cassandra connection.
|
protected void |
postOpen()
Opens a Session to Cassandra .
|
protected CompletionStage<com.datastax.driver.core.ResultSet> |
send(OUT record)
Send the actual record for writing.
|
close, open, writeRecord
getRuntimeContext, setRuntimeContext
public CassandraRowOutputFormat(String insertQuery, ClusterBuilder builder)
public CassandraRowOutputFormat(String insertQuery, ClusterBuilder builder, int maxConcurrentRequests, java.time.Duration maxConcurrentRequestsTimeout)
protected void postOpen()
protected CompletionStage<com.datastax.driver.core.ResultSet> send(OUT record)
OutputFormatBase
send
in class OutputFormatBase<OUT,com.datastax.driver.core.ResultSet>
public void configure(Configuration parameters)
parameters
- The configuration with all parameters.protected void postClose()
postClose
in class OutputFormatBase<OUT,V>
protected static <T> CompletableFuture<T> listenableFutureToCompletableFuture(com.google.common.util.concurrent.ListenableFuture<T> listenableFuture)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.