public abstract class PythonSender extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
protected static class |
PythonSender.Serializer<T>
Interface for all serializers used by
PythonSender classes to write container objects. |
Modifier and Type | Field and Description |
---|---|
static byte |
TYPE_ARRAY |
static byte |
TYPE_KEY_VALUE |
static byte |
TYPE_VALUE_VALUE |
Modifier | Constructor and Description |
---|---|
protected |
PythonSender(Configuration config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected <IN> PythonSender.Serializer<IN> |
getSerializer(IN value) |
void |
open(File outputFile) |
protected <IN> int |
sendBuffer(org.apache.flink.python.api.streaming.data.SingleElementPushBackIterator<IN> input,
PythonSender.Serializer<IN> serializer)
Extracts records from an iterator and writes them to the memory-mapped file.
|
public static final byte TYPE_ARRAY
public static final byte TYPE_KEY_VALUE
public static final byte TYPE_VALUE_VALUE
protected PythonSender(Configuration config)
public void open(File outputFile) throws IOException
IOException
public void close() throws IOException
IOException
protected <IN> int sendBuffer(org.apache.flink.python.api.streaming.data.SingleElementPushBackIterator<IN> input, PythonSender.Serializer<IN> serializer) throws IOException
input
- iterator containing recordsserializer
- serializer for the input recordsIOException
protected <IN> PythonSender.Serializer<IN> getSerializer(IN value)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.