|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.rest.model.TableSchemaModel
public class TableSchemaModel
A representation of HBase table descriptors.
<complexType name="TableSchema"> <sequence> <element name="column" type="tns:ColumnSchema" maxOccurs="unbounded" minOccurs="1"></element> </sequence> <attribute name="name" type="string"></attribute> <anyAttribute></anyAttribute> </complexType>
Constructor Summary | |
---|---|
TableSchemaModel()
Default constructor. |
|
TableSchemaModel(HTableDescriptor htd)
Constructor |
Method Summary | |
---|---|
boolean |
__getIsMeta()
|
boolean |
__getIsRoot()
|
boolean |
__getReadOnly()
|
void |
__setIsMeta(boolean value)
|
void |
__setIsRoot(boolean value)
|
void |
__setReadOnly(boolean value)
|
void |
addAttribute(String name,
Object value)
Add an attribute to the table descriptor |
void |
addColumnFamily(ColumnSchemaModel family)
Add a column family to the table descriptor |
byte[] |
createProtobufOutput()
|
Map<QName,Object> |
getAny()
|
String |
getAttribute(String name)
Return a table descriptor value as a string. |
ColumnSchemaModel |
getColumnFamily(int index)
Retrieve the column family at the given index from the table descriptor |
List<ColumnSchemaModel> |
getColumns()
|
String |
getName()
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation. |
HTableDescriptor |
getTableDescriptor()
|
void |
setColumns(List<ColumnSchemaModel> columns)
|
void |
setName(String name)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableSchemaModel()
public TableSchemaModel(HTableDescriptor htd)
htd
- the table descriptorMethod Detail |
---|
public void addAttribute(String name, Object value)
name
- attribute namevalue
- attribute valuepublic String getAttribute(String name)
name
- the attribute name
public void addColumnFamily(ColumnSchemaModel family)
family
- the column family modelpublic ColumnSchemaModel getColumnFamily(int index)
index
- the index
public String getName()
public Map<QName,Object> getAny()
public List<ColumnSchemaModel> getColumns()
public void setName(String name)
name
- the table namepublic void setColumns(List<ColumnSchemaModel> columns)
columns
- the columns to setpublic String toString()
toString
in class Object
public boolean __getIsMeta()
public boolean __getIsRoot()
public boolean __getReadOnly()
public void __setIsMeta(boolean value)
value
- desired value of IS_META attributepublic void __setIsRoot(boolean value)
value
- desired value of IS_ROOT attributepublic void __setReadOnly(boolean value)
value
- desired value of READONLY attributepublic byte[] createProtobufOutput()
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf message
IOException
public HTableDescriptor getTableDescriptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |