java.lang.Object
org.apache.hadoop.applications.mawo.server.worker.WorkerId
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class WorkerId extends Object implements org.apache.hadoop.io.Writable
Define WorkerId for Workers.
  • 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

      public final String getIPAddress()
      Get Worker IP address.
      Returns:
      IP address of worker node
    • toString

      public final String toString()
      Print workerId.
      Overrides:
      toString in class Object
      Returns:
      workeId in string
    • getWorkerId

      public final String getWorkerId()
      Get workerId.
      Returns:
      workerId : Worker identifier
    • setWorkerId

      public final void setWorkerId(String localworkerId)
      Set workerId.
      Parameters:
      localworkerId - : Worker identifier
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • write

      public final void write(DataOutput dataOutput) throws IOException
      Specified by:
      write in interface org.apache.hadoop.io.Writable
      Throws:
      IOException
    • readFields

      public final void readFields(DataInput dataInput) throws IOException
      Specified by:
      readFields in interface org.apache.hadoop.io.Writable
      Throws:
      IOException
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object