Class ClientId

java.lang.Object
org.apache.hadoop.ipc.ClientId

@Private public class ClientId extends Object
A class defining a set of static helper methods to provide conversion between bytes and string for UUID-based client Id.
  • Field Details

    • BYTE_LENGTH

      public static final int BYTE_LENGTH
      The byte array of a UUID should be 16
      See Also:
  • Constructor Details

    • ClientId

      public ClientId()
  • Method Details

    • getClientId

      public static byte[] getClientId()
      Returns:
      Return clientId as byte[].
    • toString

      public static String toString(byte[] clientId)
      Parameters:
      clientId - input clientId.
      Returns:
      Convert a clientId byte[] to string.
    • getMsb

      public static long getMsb(byte[] clientId)
    • getLsb

      public static long getLsb(byte[] clientId)
    • toBytes

      public static byte[] toBytes(String id)
      Parameters:
      id - input id.
      Returns:
      Convert from clientId string byte[] representation of clientId.