public class FlinkClient extends Object
FlinkClient mimics a Storm NimbusClient and Nimbus.Client at once, to interact with
Flink's JobManager instead of Storm's Nimbus.| Constructor and Description |
|---|
FlinkClient(Map conf,
String host,
int port)
Instantiates a new
FlinkClient for the given configuration, host name, and port. |
FlinkClient(Map conf,
String host,
int port,
Integer timeout)
Instantiates a new
FlinkClient for the given configuration, host name, and port. |
| Modifier and Type | Method and Description |
|---|---|
FlinkClient |
getClient()
Return a reference to itself.
|
static FlinkClient |
getConfiguredClient(Map conf)
Returns a
FlinkClient that uses the configured Config.NIMBUS_HOST and Config.NIMBUS_THRIFT_PORT as JobManager address. |
void |
killTopology(String name) |
void |
killTopologyWithOpts(String name,
backtype.storm.generated.KillOptions options) |
void |
submitTopology(String name,
String uploadedJarLocation,
FlinkTopology topology)
Parameter
uploadedJarLocation is actually used to point to the local jar, because Flink does not support
uploading a jar file before hand. |
void |
submitTopologyWithOpts(String name,
String uploadedJarLocation,
FlinkTopology topology)
Parameter
uploadedJarLocation is actually used to point to the local jar, because Flink does not support
uploading a jar file before hand. |
public FlinkClient(Map conf, String host, int port)
FlinkClient for the given configuration, host name, and port. If values for Config.NIMBUS_HOST and Config.NIMBUS_THRIFT_PORT of the given configuration are ignored.conf - A configuration.host - The jobmanager's host name.port - The jobmanager's rpc port.public FlinkClient(Map conf, String host, int port, Integer timeout)
FlinkClient for the given configuration, host name, and port. If values for Config.NIMBUS_HOST and Config.NIMBUS_THRIFT_PORT of the given configuration are ignored.conf - A configuration.host - The jobmanager's host name.port - The jobmanager's rpc port.timeout - Timeoutpublic static FlinkClient getConfiguredClient(Map conf)
FlinkClient that uses the configured Config.NIMBUS_HOST and Config.NIMBUS_THRIFT_PORT as JobManager address.conf - Configuration that contains the jobmanager's hostname and port.FlinkClient.public FlinkClient getClient()
FlinkClient mimics both, NimbusClient and Nimbus.Client, at once.
public void submitTopology(String name, String uploadedJarLocation, FlinkTopology topology) throws backtype.storm.generated.AlreadyAliveException, backtype.storm.generated.InvalidTopologyException
uploadedJarLocation is actually used to point to the local jar, because Flink does not support
uploading a jar file before hand. Jar files are always uploaded directly when a program is submitted.backtype.storm.generated.AlreadyAliveExceptionbacktype.storm.generated.InvalidTopologyExceptionpublic void submitTopologyWithOpts(String name, String uploadedJarLocation, FlinkTopology topology) throws backtype.storm.generated.AlreadyAliveException, backtype.storm.generated.InvalidTopologyException
uploadedJarLocation is actually used to point to the local jar, because Flink does not support
uploading a jar file before hand. Jar files are always uploaded directly when a program is submitted.backtype.storm.generated.AlreadyAliveExceptionbacktype.storm.generated.InvalidTopologyExceptionpublic void killTopology(String name) throws backtype.storm.generated.NotAliveException
backtype.storm.generated.NotAliveExceptionpublic void killTopologyWithOpts(String name, backtype.storm.generated.KillOptions options) throws backtype.storm.generated.NotAliveException
backtype.storm.generated.NotAliveExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.