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,
org.apache.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 org.apache.storm.generated.AlreadyAliveException, org.apache.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.org.apache.storm.generated.AlreadyAliveException
org.apache.storm.generated.InvalidTopologyException
public void submitTopologyWithOpts(String name, String uploadedJarLocation, FlinkTopology topology) throws org.apache.storm.generated.AlreadyAliveException, org.apache.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.org.apache.storm.generated.AlreadyAliveException
org.apache.storm.generated.InvalidTopologyException
public void killTopology(String name) throws org.apache.storm.generated.NotAliveException
org.apache.storm.generated.NotAliveException
public void killTopologyWithOpts(String name, org.apache.storm.generated.KillOptions options) throws org.apache.storm.generated.NotAliveException
org.apache.storm.generated.NotAliveException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.