Class TableRegionModel

java.lang.Object
org.apache.hadoop.hbase.rest.model.TableRegionModel
All Implemented Interfaces:
Serializable

@Private public class TableRegionModel extends Object implements 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 Details

  • Constructor Details

    • TableRegionModel

      Constructor
    • TableRegionModel

      public TableRegionModel(String table, long id, byte[] startKey, byte[] endKey)
      Constructor
      Parameters:
      table - the table name
      id - the encoded id of the region
      startKey - the start key of the region
      endKey - the end key of the region
    • TableRegionModel

      public TableRegionModel(String table, long id, byte[] startKey, byte[] endKey, String location)
      Constructor
      Parameters:
      table - the table name
      id - the encoded id of the region
      startKey - the start key of the region
      endKey - the end key of the region
      location - the name and port of the region server hosting the region
  • Method Details

    • getName

      public String getName()
      Returns the region name
    • getId

      public long getId()
      Returns the encoded region id
    • getStartKey

      public byte[] getStartKey()
      Returns the start key
    • getEndKey

      public byte[] getEndKey()
      Returns the end key
    • getLocation

      public String getLocation()
      Returns the name and port of the region server hosting the region
    • setName

      public void setName(String name)
      Parameters:
      name - region printable name
    • setId

      public void setId(long id)
      Parameters:
      id - the region's encoded id
    • setStartKey

      public void setStartKey(byte[] startKey)
      Parameters:
      startKey - the start key
    • setEndKey

      public void setEndKey(byte[] endKey)
      Parameters:
      endKey - the end key
    • setLocation

      public void setLocation(String location)
      Parameters:
      location - the name and port of the region server hosting the region
    • toString

      public String toString()
      Overrides:
      toString in class Object