Class TableRegionModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.TableRegionModel
- All Implemented Interfaces:
Serializable
Representation of a region of a table and its current location on the storage cluster.
<complexType name="TableRegion"> <attribute name="name" type="string"></attribute> <attribute name="id" type="int"></attribute> <attribute name="startKey" type="base64Binary"></attribute> <attribute name="endKey" type="base64Binary"></attribute> <attribute name="location" type="string"></attribute> </complexType>
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorTableRegionModel
(String table, long id, byte[] startKey, byte[] endKey) ConstructorTableRegionModel
(String table, long id, byte[] startKey, byte[] endKey, String location) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the end keylong
getId()
Returns the encoded region idReturns the name and port of the region server hosting the regiongetName()
Returns the region namebyte[]
Returns the start keyvoid
setEndKey
(byte[] endKey) void
setId
(long id) void
setLocation
(String location) void
void
setStartKey
(byte[] startKey) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
table
-
id
-
startKey
-
endKey
-
location
-
-
Constructor Details
-
TableRegionModel
public TableRegionModel()Constructor -
TableRegionModel
Constructor- Parameters:
table
- the table nameid
- the encoded id of the regionstartKey
- the start key of the regionendKey
- the end key of the region
-
TableRegionModel
Constructor- Parameters:
table
- the table nameid
- the encoded id of the regionstartKey
- the start key of the regionendKey
- the end key of the regionlocation
- the name and port of the region server hosting the region
-
-
Method Details
-
getName
Returns the region name -
getId
Returns the encoded region id -
getStartKey
Returns the start key -
getEndKey
Returns the end key -
getLocation
Returns the name and port of the region server hosting the region -
setName
- Parameters:
name
- region printable name
-
setId
- Parameters:
id
- the region's encoded id
-
setStartKey
- Parameters:
startKey
- the start key
-
setEndKey
- Parameters:
endKey
- the end key
-
setLocation
- Parameters:
location
- the name and port of the region server hosting the region
-
toString
-