public class TemporaryJob extends Object
Modifier and Type | Method and Description |
---|---|
com.google.common.net.HostAndPort |
address(String port)
Returns a
HostAndPort for a registered port. |
List<com.google.common.net.HostAndPort> |
addresses(String port)
Returns a
HostAndPort object for a registered port, for each
host the job has been deployed to. |
List<String> |
hosts() |
Job |
job() |
Integer |
port(String host,
String port)
Returns the port that a job can be reached at given the host and name of registered port.
|
Map<String,TaskStatus> |
statuses() |
void |
undeploy()
Undeploys and removes this TemporaryJob from the Helios cluster.
|
public Job job()
public Map<String,TaskStatus> statuses()
public Integer port(String host, String port)
host
- the host where the job is deployedport
- the name of the registered portpublic com.google.common.net.HostAndPort address(String port)
HostAndPort
for a registered port. This is useful
for discovering the value of dynamically allocated ports. This method should only be called
when the job has been deployed to a single host. If the job has been deployed to multiple
hosts an AssertionError will be thrown indicating that the addresses(String)
method
should must called instead.port
- the name of the registered portAssertionError
- if the job has been deployed to more than one hostpublic List<com.google.common.net.HostAndPort> addresses(String port)
HostAndPort
object for a registered port, for each
host the job has been deployed to. This is useful for discovering the value of dynamically
allocated ports.port
- the name of the registered portpublic void undeploy()
Copyright © 2016. All rights reserved.