IN
- Type of the elements emitted by this sinkpublic class CassandraPojoSink<IN> extends CassandraSinkBase<IN,Void>
Modifier and Type | Field and Description |
---|---|
protected Class<IN> |
clazz |
protected com.datastax.driver.mapping.Mapper<IN> |
mapper |
protected com.datastax.driver.mapping.MappingManager |
mappingManager |
Constructor and Description |
---|
CassandraPojoSink(Class<IN> clazz,
ClusterBuilder builder)
The main constructor for creating CassandraPojoSink
|
Modifier and Type | Method and Description |
---|---|
void |
open(Configuration configuration)
Initialization method for the function.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
send(IN value) |
close, invoke
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
protected transient com.datastax.driver.mapping.Mapper<IN> mapper
protected transient com.datastax.driver.mapping.MappingManager mappingManager
public CassandraPojoSink(Class<IN> clazz, ClusterBuilder builder)
clazz
- Classpublic 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 MyMapper extends FilterFunction<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,Void>
configuration
- The configuration containing the parameters attached to the contract.Configuration
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.