Describe Table
TableSpec describeTable(String tableName)
Function
Describes the table, obtains table structure and metadata information
Method parameters
1.tableName : String : required
Method return value
tableSpec : TableSpec
Includes both TableSchema and TableMeta parts
TableSchema
1.entityGroupSpec, table entity group key
2.primaryIndex, primary key of the table
3.attributes, attributes of the table
4.secondaryIndexes, secondary index of the table
5.ttl, survival time of table data
6.preSplits, pre-splits
TableMeta
1.quota, table space size quota
2.throughput, read and write quota of the table
3.appAcl, the app permissions of the table under its developer account
4.description, a brief description of the table
exceededThroughput, the maximum read/write quota for primary cluster
slaveThroughput, pre-device cluster's read/write quota
exceededSlaveThroughput, maximum read/write quota for standby cluster
Exception error code
INTERNAL_ERROR(1): Server exception
ACCESS_DENIED(4): No permission to describe table
RESOURCE_NOT_FOUND(9): Described table does not exist
Limitation
Only table owner can describe table operations
Example
With the Example table, the sample code for describing table is provided below
$tableName = 'php-note';
$tableSpec = $adminClient->describeTable($tableName);
print_r($tableSpec);