Class WorkerId
java.lang.Object
org.apache.hadoop.applications.mawo.server.worker.WorkerId
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
Define WorkerId for Workers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanfinal org.apache.hadoop.io.TextGet hostname for Worker.final StringGet Worker IP address.final StringGet workerId.final inthashCode()final voidreadFields(DataInput dataInput) final voidsetHostname(org.apache.hadoop.io.Text wkhostname) Set hostname for Worker.final voidsetWorkerId(String localworkerId) Set workerId.final StringtoString()Print workerId.final voidwrite(DataOutput dataOutput)
-
Constructor Details
-
WorkerId
public WorkerId()Default constructor for workerId. Set Hostname and Ip address of the machine where worker is running.
-
-
Method Details
-
getHostname
public final org.apache.hadoop.io.Text getHostname()Get hostname for Worker.- Returns:
- hostname of worker node
-
setHostname
public final void setHostname(org.apache.hadoop.io.Text wkhostname) Set hostname for Worker.- Parameters:
wkhostname- : Hostname of worker
-
getIPAddress
Get Worker IP address.- Returns:
- IP address of worker node
-
toString
Print workerId. -
getWorkerId
Get workerId.- Returns:
- workerId : Worker identifier
-
setWorkerId
Set workerId.- Parameters:
localworkerId- : Worker identifier
-
equals
-
write
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
readFields
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Throws:
IOException
-
hashCode
public final int hashCode()
-