Package org.apache.hadoop.hbase.client
Class ClientIdGenerator
java.lang.Object
org.apache.hadoop.hbase.client.ClientIdGenerator
The class that is able to determine some unique strings for the client, such as an IP address,
PID, and composite deterministic ID.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Returns a unique ID incorporating IP address, PID, TID and timer.static byte[]
Returns Some IPv4/IPv6 address available on the current machine that is up, not virtual and not a loopback address.static Long
getPid()
Returns PID of the current process, if it can be extracted from JVM name, or null.
-
Field Details
-
LOG
-
-
Constructor Details
-
ClientIdGenerator
private ClientIdGenerator()
-
-
Method Details
-
generateClientId
Returns a unique ID incorporating IP address, PID, TID and timer. Might be an overkill... Note though that new UUID in java by default is just a random number. -
getPid
Returns PID of the current process, if it can be extracted from JVM name, or null. -
getIpAddressBytes
Returns Some IPv4/IPv6 address available on the current machine that is up, not virtual and not a loopback address. Empty array if none can be found or error occurred.
-