Thrift module: Hbase

ModuleServicesData typesConstants
HbaseHbase
AlreadyExists
BatchMutation
Bytes
ColumnDescriptor
IOError
IllegalArgument
Mutation
ScannerID
TCell
TRegionInfo
TRowResult
Text

Type declarations

Typedef: Text

Base type: string

Typedef: Bytes

Base type: string

Typedef: ScannerID

Base type: i32


Data structures

Struct: TCell

FieldTypeDescriptionRequiredDefault value
valueBytesyes
timestampi64yes

TCell - Used to transport a cell value (byte[]) and the timestamp it was stored with together as a result for get and getRow methods. This promotes the timestamp of a cell to a first-class value, making it easy to take note of temporal data. Cell is used all the way from HStore up to HTable.

Struct: ColumnDescriptor

FieldTypeDescriptionRequiredDefault value
nameTextyes
maxVersionsi32yes3
compressionstringyes"NONE"
inMemoryboolyes0
bloomFilterTypestringyes"NONE"
bloomFilterVectorSizei32yes0
bloomFilterNbHashesi32yes0
blockCacheEnabledboolyes0
timeToLivei32yes-1

An HColumnDescriptor contains information about a column family such as the number of versions, compression settings, etc. It is used as input when creating a table or adding a column.

Struct: TRegionInfo

FieldTypeDescriptionRequiredDefault value
startKeyTextyes
endKeyTextyes
idi64yes
nameTextyes
versionbyteyes

A TRegionInfo contains information about an HTable region.

Struct: Mutation

FieldTypeDescriptionRequiredDefault value
isDeleteboolyes0
columnTextyes
valueTextyes

A Mutation object is used to either update or delete a column-value.

Struct: BatchMutation

FieldTypeDescriptionRequiredDefault value
rowTextyes
mutationslist<Mutation>yes

A BatchMutation object is used to apply a number of Mutations to a single row.

Struct: TRowResult

FieldTypeDescriptionRequiredDefault value
rowTextyes
columnsmap<Text, TCell>yes

Holds row name and then a map of columns to cells.

Exception: IOError

FieldTypeDescriptionRequiredDefault value
messagestringyes

An IOError exception signals that an error occurred communicating to the Hbase master or an Hbase region server. Also used to return more general Hbase error conditions.

Exception: IllegalArgument

FieldTypeDescriptionRequiredDefault value
messagestringyes

An IllegalArgument exception indicates an illegal or invalid argument was passed into a procedure.

Exception: AlreadyExists

FieldTypeDescriptionRequiredDefault value
messagestringyes

An AlreadyExists exceptions signals that a table with the specified name already exists

Services

Service: Hbase

Function: Hbase.enableTable

void enableTable(Bytes tableName)
    throws IOError
Brings a table on-line (enables it)

Parameters
NameDescription
tableNamename of the table

Function: Hbase.disableTable

void disableTable(Bytes tableName)
    throws IOError
Disables a table (takes it off-line) If it is being served, the master will tell the servers to stop serving it.

Parameters
NameDescription
tableNamename of the table

Function: Hbase.isTableEnabled

bool isTableEnabled(Bytes tableName)
    throws IOError
@return true if table is on-line

Parameters
NameDescription
tableNamename of the table to check

Function: Hbase.compact

void compact(Bytes tableNameOrRegionName)
    throws IOError

Parameters
NameDescription
tableNameOrRegionName

Function: Hbase.majorCompact

void majorCompact(Bytes tableNameOrRegionName)
    throws IOError

Parameters
NameDescription
tableNameOrRegionName

Function: Hbase.getTableNames

list<Text> getTableNames()
    throws IOError
List all the userspace tables.