public abstract class TaskInfo extends Object implements org.apache.hadoop.io.Writable
Constructor and Description |
---|
TaskInfo()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getHostname()
Get this task's hostname
|
String |
getHostnameId()
Get hostname and task id
|
String |
getHostOrIp()
Get this task's host address.
|
InetSocketAddress |
getInetSocketAddress()
Get a new instance of the InetSocketAddress for this hostname and port
|
int |
getPort()
Get port that the IPC server of this task is using
|
int |
getTaskId()
Get task partition id of this task
|
int |
hashCode() |
void |
readFields(DataInput input) |
void |
setInetSocketAddress(InetSocketAddress address,
String host)
Set address that the IPC server of this task is using
|
void |
setTaskId(int taskId)
Set task partition id of this task
|
String |
toString() |
void |
write(DataOutput output) |
public String getHostname()
public String getHostOrIp()
public int getPort()
public void setInetSocketAddress(InetSocketAddress address, String host)
address
- Addresshost
- host name or IPpublic InetSocketAddress getInetSocketAddress()
public void setTaskId(int taskId)
taskId
- partition idpublic int getTaskId()
public String getHostnameId()
public void readFields(DataInput input) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.