public class RemoteCollectorOutputFormat<T> extends Object implements org.apache.flink.api.common.io.OutputFormat<T>
RemoteCollector implementation. The client has to provide an
implementation of RemoteCollector and has to write it's plan's output
into an instance of RemoteCollectorOutputFormat. Further in the
client's VM parameters -Djava.rmi.server.hostname should be set to the own IP
address.| Modifier and Type | Field and Description |
|---|---|
static String |
PORT
Config parameter for the remote's port number
|
static String |
REMOTE
Config parameter for the remote's address
|
static String |
RMI_ID
An id used necessary for Java RMI
|
| Constructor and Description |
|---|
RemoteCollectorOutputFormat()
Create a new
RemoteCollectorOutputFormat instance. |
RemoteCollectorOutputFormat(String remote,
int port,
String rmiId)
Creates a new
RemoteCollectorOutputFormat instance for the
specified remote and port. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method unbinds the reference of the implementation of
RemoteCollector. |
void |
configure(org.apache.flink.configuration.Configuration parameters) |
void |
open(int taskNumber,
int numTasks) |
String |
toString() |
void |
writeRecord(T record)
This method forwards records simply to the remote's
RemoteCollector implementation |
public static final String PORT
public static final String REMOTE
public static final String RMI_ID
public RemoteCollectorOutputFormat()
RemoteCollectorOutputFormat instance. The remote and
port for this output are by default localhost:8888 but can be configured
via a Configuration object.public RemoteCollectorOutputFormat(String remote, int port, String rmiId)
RemoteCollectorOutputFormat instance for the
specified remote and port.rmiId - public void configure(org.apache.flink.configuration.Configuration parameters)
configure in interface org.apache.flink.api.common.io.OutputFormat<T>public void open(int taskNumber,
int numTasks)
throws IOException
open in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionpublic void writeRecord(T record) throws IOException
RemoteCollector implementationwriteRecord in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionpublic void close()
throws IOException
RemoteCollector.close in interface org.apache.flink.api.common.io.OutputFormat<T>IOExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.