public class TaskManagerLocation extends Object implements Comparable<TaskManagerLocation>, Serializable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TaskManagerLocation.DefaultHostNameSupplier
This Supplier class could retrieve the FQDN host name of the given InetAddress on demand,
extract the pure host name and cache the results for later use.
|
static interface |
TaskManagerLocation.HostNameSupplier |
static class |
TaskManagerLocation.IpOnlyHostNameSupplier
This Supplier class returns the IP address of the given InetAddress directly, therefore no
reverse DNS lookup is required.
|
static class |
TaskManagerLocation.ResolutionMode
The DNS resolution mode for TaskManager's IP address.
|
| 构造器和说明 |
|---|
TaskManagerLocation(ResourceID resourceID,
InetAddress inetAddress,
int dataPort)
Constructs a new instance connection info object.
|
TaskManagerLocation(ResourceID resourceID,
InetAddress inetAddress,
int dataPort,
TaskManagerLocation.HostNameSupplier hostNameSupplier)
Constructs a new instance connection info object.
|
| 限定符和类型 | 方法和说明 |
|---|---|
InetAddress |
address()
Returns the network address the instance's task manager binds its sockets to.
|
String |
addressString()
Gets the IP address where the TaskManager operates.
|
int |
compareTo(TaskManagerLocation o) |
int |
dataPort()
Returns the port instance's task manager expects to receive transfer envelopes on.
|
boolean |
equals(Object obj) |
static TaskManagerLocation |
fromUnresolvedLocation(UnresolvedTaskManagerLocation unresolvedLocation,
TaskManagerLocation.ResolutionMode resolutionMode) |
String |
getFQDNHostname()
Returns the fully-qualified domain name of the TaskManager provided by
hostNameSupplier. |
String |
getHostname()
Gets the hostname of the TaskManager from
hostNameSupplier. |
static String |
getHostName(InetAddress inetAddress)
Gets the hostname of the TaskManager based on the network address.
|
ResourceID |
getResourceID()
Gets the ID of the resource in which the TaskManager is started.
|
int |
hashCode() |
String |
toString() |
@VisibleForTesting public TaskManagerLocation(ResourceID resourceID, InetAddress inetAddress, int dataPort, TaskManagerLocation.HostNameSupplier hostNameSupplier)
inetAddress - the network address the instance's task manager binds its sockets todataPort - the port instance's task manager expects to receive transfer envelopes onhostNameSupplier - the supplier for obtaining fully-qualified domain name and pure
hostname of the task manager@VisibleForTesting public TaskManagerLocation(ResourceID resourceID, InetAddress inetAddress, int dataPort)
inetAddress - the network address the instance's task manager binds its sockets todataPort - the port instance's task manager expects to receive transfer envelopes onpublic static TaskManagerLocation fromUnresolvedLocation(UnresolvedTaskManagerLocation unresolvedLocation, TaskManagerLocation.ResolutionMode resolutionMode) throws UnknownHostException
public ResourceID getResourceID()
public int dataPort()
public InetAddress address()
public String addressString()
public String getFQDNHostname()
hostNameSupplier.public String getHostname()
hostNameSupplier.public static String getHostName(InetAddress inetAddress)
inetAddress - the network address that the TaskManager binds its sockets topublic int compareTo(@Nonnull TaskManagerLocation o)
compareTo 在接口中 Comparable<TaskManagerLocation>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.