Indexes & Dictionaries API
Indexes API allows you to retrieve indexes, memory, and dictionaries for all tables across your Indexima cluster.
Retrieve all indexes
Retrieve all indexes in your Indexima cluster.
GET /api/monitor/get/indexes
JSON Format
The index has the following JSON format:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
schemas.schema | String | The schema name | |||||||||||||||||||||||||||
schemas.tables | Array |
|
Example response
{
"schemas": [
{
"schema": "default",
"tables": [
{
"name": "nyc_yellow",
"dico": 812454,
"indexes": [
{
"name": "nyc_yellow0",
"count": 10000,
"size": 15000,
"main": true
}
]
}
]
}
]
}
Get the memory used for each index
Retrieve the memory used for all tables on each node of your cluster. This request is equivalent to executing a SHOW MEMORY ALL
SQL command.
GET /api/monitor/get/memory
JSON Format
Memory is represented by a tree structure with the following path :
Name of the node -> Schema -> Table -> Index
Name | Type | Description |
---|---|---|
loaded | Boolean | true if the current index is loaded in memory. |
dictionary | Integer | The dictionaries memory size, in bytes |
size | Integer | The index memory size, in bytes |
count | Integer | This index number of lines |
bucketsize | Integer | The bucket disk size |
isLimited | Boolean | true if the parent table is a limited table |
isOnError | Boolean | true if this index is on error and can't be used |
isDimension | Boolean | true if the parent table is a dimension table |
isExternal | Boolean | true if the parent table is an external table |
isTemporary | Boolean | true if the parent table is a temporary table |
Example response
{
"Node 0": {
"etalon": {
"nyc_cab_dim_dest": {
"nyc_cab_dim_dest0": {
"loaded": true,
"dictionary": 8729279,
"size": 2716092,
"isOnError": false,
"isDimension": true,
"isExternal": false,
"count": 81276,
"isTemporary": false,
"bucketsize": 0
}
}
}
}
Get the dictionaries details
Retrieve the dictionary details used for all tables on each node of your cluster. This request is equivalent to executing a SHOW DICTIONARIES ALL
SQL command.
GET /api/monitor/get/dictionaries
JSON Format
Dictionary is represented by a tree structure with the following path :
Name of the node -> Schema -> Table -> Dictionary field or expression
Two structures are sent :
- Total memory and lines count, by node
- Details for each table on each node
Name | Type | Description |
size | Integer | The dictionary memory size, in bytes |
count | Integer | The dictionary number of words |
loaded | Boolean | true is this dictionary is currently in memory |
Example response
{
"totals": {
"bynodes": {
"Node 0": {
"count": 5440,
"size": 26907305,
"loaded": true
}
}
},
"details": {
"Node 0": {
"etalon": {
"nyc_yellow_full": {
"(Floor(If((1=0),NULL,(`etalon`.`nyc_yellow_full`.`trip_distance`/1)))<60)": {
"count": 1,
"size": 1048998,
"loaded": true
},
"passenger_count": {
"count": 8,
"size": 1049854,
"loaded": false
}
}
}
}
}
}