{ “title”: “SHOW-TABLETS”, “language”: “en”

}

SHOW-TABLETS

Name

SHOW TABLETS

Description

This statement is used to list tablets of the specified table (only for administrators)

grammar:

1. SHOW TABLETS FROM [database.]table [PARTITIONS(p1,p2)]
2. [WHERE where_condition]
3. [ORDER BY col_name]
4. [LIMIT [offset,] row_count]
  1. Syntax Description:

where_condition could be one of:

1. Version = version
2. state = "NORMAL|ROLLUP|CLONE|DECOMMISSION"
3. BackendId = backend_id

or compound them with operator AND.

Example

  1. list all tablets of the specified table

1. SHOW TABLETS FROM example_db.table_name; 2. list all tablets of the specified partitions

1. SHOW TABLETS FROM example_db.table_name PARTITIONS(p1, p2); 3. list all DECOMMISSION tablets on the specified backend

1. SHOW TABLETS FROM example_db.table_name WHERE state="DECOMMISSION" AND BackendId=11003;

Keywords

1. SHOW, TABLETS

Best Practice