IN
- Type of the elements emitted by this sinkpublic abstract class AbstractCassandraTupleSink<IN> extends CassandraSinkBase<IN,com.datastax.driver.core.ResultSet>
SinkFunction.Context<T>
cluster, log, session
Constructor and Description |
---|
AbstractCassandraTupleSink(String insertQuery,
ClusterBuilder builder,
CassandraSinkBaseConfig config,
CassandraFailureHandler failureHandler) |
Modifier and Type | Method and Description |
---|---|
protected abstract Object[] |
extract(IN record) |
void |
open(Configuration configuration)
Initialization method for the function.
|
com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> |
send(IN value) |
close, createSession, initializeState, invoke, snapshotState
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
invoke
public AbstractCassandraTupleSink(String insertQuery, ClusterBuilder builder, CassandraSinkBaseConfig config, CassandraFailureHandler failureHandler)
public void open(Configuration configuration)
RichFunction
The configuration object passed to the function can be used for configuration and initialization. The configuration contains all parameters that were configured on the function in the program composition.
public class MyFilter extends RichFilterFunction<String> {
private String searchString;
public void open(Configuration parameters) {
this.searchString = parameters.getString("foo");
}
public boolean filter(String value) {
return value.equals(searchString);
}
}
By default, this method does nothing.
open
in interface RichFunction
open
in class CassandraSinkBase<IN,com.datastax.driver.core.ResultSet>
configuration
- The configuration containing the parameters attached to the contract.Configuration
public com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> send(IN value)
send
in class CassandraSinkBase<IN,com.datastax.driver.core.ResultSet>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.