org.apache.hadoop.hbase.rest.model
Class TableRegionModel

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

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:
Serialized Form

Constructor Summary
TableRegionModel()
          Constructor
TableRegionModel(String table, long id, byte[] startKey, byte[] endKey)
          Constructor
TableRegionModel(String table, long id, byte[] startKey, byte[] endKey, String location)
          Constructor
 
Method Summary
 byte[] getEndKey()
           
 long getId()
           
 String getLocation()
           
 String getName()
           
 byte[] getStartKey()
           
 void setEndKey(byte[] endKey)
           
 void setId(long id)
           
 void setLocation(String location)
           
 void setName(String name)
           
 void setStartKey(byte[] startKey)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableRegionModel

public 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 Detail

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


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.