ClientId (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.ipc, class: ClientId

Package org.apache.hadoop.ipc

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `BYTE_LENGTH`
  The byte array of a UUID should be 16

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClientId()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static byte[]`
  `getClientId()`
  `static long`
  `getLsb(byte[] clientId)`
  `static long`
  `getMsb(byte[] clientId)`
  `static byte[]`
  `toBytes(String id)`
  `static String`
  `toString(byte[] clientId)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### BYTE_LENGTH

    public static final int BYTE_LENGTH
    The byte array of a UUID should be 16
    See Also:
      - Constant Field Values

- ## 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.