Class ServerName

java.lang.Object
org.apache.hadoop.hbase.ServerName
All Implemented Interfaces:
Serializable, Comparable<ServerName>
Direct Known Subclasses:
StartcodeAgnosticServerName

@Public public class ServerName extends Object implements Comparable<ServerName>, Serializable
Name of a particular incarnation of an HBase Server. A ServerName is used uniquely identifying a server instance in a cluster and is made of the combination of hostname, port, and startcode. The startcode distinguishes restarted servers on same hostname and port (startcode is usually timestamp of server startup). The toString() format of ServerName is safe to use in the filesystem and as znode name up in ZooKeeper. Its format is: <hostname> 'SERVERNAME_SEPARATOR' <port> 'SERVERNAME_SEPARATOR' <startcode>. For example, if hostname is www.example.org, port is 1234, and the startcode for the regionserver is 1212121212, then the toString() would be www.example.org,1234,1212121212.

You can obtain a versioned serialized form of this class by calling getVersionedBytes(). To deserialize, call parseVersionedServerName(byte[]).

Use getAddress() to obtain the Server hostname + port (Endpoint/Socket Address).

Immutable.

See Also: