IN - data to be written into the Socket.public class SocketClientSink<IN> extends RichSinkFunction<IN>
| Constructor and Description |
|---|
SocketClientSink(String hostName,
int port,
SerializationSchema<IN,byte[]> schema)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection with the Socket server.
|
void |
intializeConnection()
Initializes the connection to Socket.
|
void |
invoke(IN value)
Called when new data arrives to the sink, and forwards it to Socket.
|
void |
open(org.apache.flink.configuration.Configuration parameters)
Initialize the connection with the Socket in the server.
|
public SocketClientSink(String hostName, int port, SerializationSchema<IN,byte[]> schema)
hostName - Host of the Socket server.port - Port of the Socket.schema - Schema of the data.public void intializeConnection()
public void invoke(IN value)
invoke in interface SinkFunction<IN>invoke in class RichSinkFunction<IN>value - The incoming datapublic void open(org.apache.flink.configuration.Configuration parameters)
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionparameters - Configuration.public void close()
close in interface org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.