org.apache.hadoop.hbase
Class HRegionLocation
java.lang.Object
org.apache.hadoop.hbase.HRegionLocation
- All Implemented Interfaces:
- Comparable<HRegionLocation>
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class HRegionLocation
- extends Object
- implements Comparable<HRegionLocation>
Data structure to hold HRegionInfo and the address for the hosting
HRegionServer. Immutable. Comparable, but we compare the 'location' only:
i.e. the hostname and port, and *not* the regioninfo. This means two
instances are the same if they refer to the same 'location' (the same
hostname and port), though they may be carrying different regions.
HRegionLocation
public HRegionLocation(HRegionInfo regionInfo,
ServerName serverName)
HRegionLocation
public HRegionLocation(HRegionInfo regionInfo,
ServerName serverName,
long seqNum)
toString
public String toString()
- Overrides:
toString
in class Object
- See Also:
Object.toString()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
- See Also:
Object.hashCode()
getRegionInfo
public HRegionInfo getRegionInfo()
- Returns:
- HRegionInfo
getHostname
public String getHostname()
getPort
public int getPort()
getSeqNum
public long getSeqNum()
getHostnamePort
public String getHostnamePort()
- Returns:
- String made of hostname and port formatted as per
Addressing.createHostAndPortStr(String, int)
getServerName
public ServerName getServerName()
compareTo
public int compareTo(HRegionLocation o)
- Specified by:
compareTo
in interface Comparable<HRegionLocation>
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.