Package org.apache.hadoop.hbase
Class HRegionLocation
java.lang.Object
org.apache.hadoop.hbase.HRegionLocation
- All Implemented Interfaces:
Comparable<HRegionLocation>
Data structure to hold RegionInfo 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. On a big cluster, each client
will have thousands of instances of this object, often 100 000 of them if not million. It's
important to keep the object size as small as possible.
This interface has been marked InterfaceAudience.Public in 0.96 and 0.98.
This interface has been marked InterfaceAudience.Public in 0.96 and 0.98.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegionInfo
private final long
private final ServerName
-
Constructor Summary
ConstructorsConstructorDescriptionHRegionLocation
(RegionInfo regionInfo, ServerName serverName) HRegionLocation
(RegionInfo regionInfo, ServerName serverName, long seqNum) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Returns String made of hostname and port formatted as perAddressing.createHostAndPortStr(String, int)
int
getPort()
Returns regionInfolong
int
hashCode()
toString()
-
Field Details
-
regionInfo
-
serverName
-
seqNum
-
-
Constructor Details
-
HRegionLocation
-
HRegionLocation
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getRegion
Returns regionInfo -
getHostname
-
getPort
-
getSeqNum
-
getHostnamePort
Returns String made of hostname and port formatted as perAddressing.createHostAndPortStr(String, int)
-
getServerName
-
compareTo
- Specified by:
compareTo
in interfaceComparable<HRegionLocation>
-