org.apache.hadoop.hbase
Class HServerAddress
java.lang.Object
org.apache.hadoop.hbase.HServerAddress
- All Implemented Interfaces:
- Comparable<HServerAddress>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<HServerAddress>
public class HServerAddress
- extends Object
- implements org.apache.hadoop.io.WritableComparable<HServerAddress>
HServerAddress is a "label" for a HBase server made of host and port number.
HServerAddress
public HServerAddress()
HServerAddress
public HServerAddress(InetSocketAddress address)
- Construct an instance from an
InetSocketAddress.
- Parameters:
address - InetSocketAddress of server
HServerAddress
public HServerAddress(String hostAndPort)
- Parameters:
hostAndPort - Hostname and port formatted as <hostname> ':' <port>
HServerAddress
public HServerAddress(String bindAddress,
int port)
- Parameters:
bindAddress - Hostnameport - Port number
HServerAddress
public HServerAddress(HServerAddress other)
- Copy-constructor.
- Parameters:
other - HServerAddress to copy from
getBindAddress
public String getBindAddress()
- Returns:
- Bind address
getPort
public int getPort()
- Returns:
- Port number
getHostname
public String getHostname()
- Returns:
- Hostname
getInetSocketAddress
public InetSocketAddress getInetSocketAddress()
- Returns:
- The InetSocketAddress
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- String formatted as
<bind address> ':' <port>
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write in interface org.apache.hadoop.io.Writable
- Throws:
IOException
compareTo
public int compareTo(HServerAddress o)
- Specified by:
compareTo in interface Comparable<HServerAddress>
Copyright © 2010 Apache Software Foundation. All Rights Reserved.