The table configurations are listed below:
Configurations | Description | Options | Updated |
---|---|---|---|
number_of_shards | Number of shards | Greater than 1, defaults to 0 | No |
number_of_replicas | Number of replicas | [1, 5], defaults to 1 | Yes |
create_date | Table creation date | No | |
data_center | Cross-datacenter related configurations. Represents primary data center | Defaults to “DEFAULT” | Yes |
disaster_preparedness | Cross-datacenter related configurations. Represents if high availability across data centers is enabled | True/False, defaults to false | Yes |
scatter_replica | Cross-datacenter related configurations. Generally, at least 1 replica will be allocated to each data center. When set to true, replicas will be allocated to all data centers as much as possible. If there are 5 replicas and 3 data centers, 1 center will have 1 replica, and the others will have 2 for each of them. When set to false, replicas will be allocated mainly to primary data center. Thus if there are 5 replicas and 3 data centers, primary data center will have 3 replicas, and other two centers will have one for each | True/False, defaults to false | Yes |
dc_affinity | Cross-datacenter related configurations. When set to True, Hippo will try to migrate the leadership of replicas into primary data center | True/False, defaults to false | Yes |
tag | Tag | Yes | |
embedding.segment.max_size_mb | Expected size of each index segment | Defaults to 512 MB | Yes |
embedding.segment.seal_proportion | When the size of Flat index in the memory exceeds a certain percentage of the value set in “embedding.segment.max_size_mb”, Hippo will generate vector index automatically for incremental data. This parameter is used for configuring this percentage | Defaults to 0.2 | Yes |
embedding.segment.max_deletion_proportion | When the volume of data deleted in index segments exceeds a certain percentage, Hippo will automatically compact vector index segments to release available resources. This parameter is used for configuring this percentage | Defaults to 0.1 | Yes |
Table 12 Table Configurations
Check Table Configuration
Users can use the following commands to check the table configuration.
curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/_settings?database_name={database_name}&pretty'
curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/{table}/_settings?database_name={database_name}&pretty'
curl -u shiva:shiva -XGET 'localhost:8902/hippo/v1/{table}/_setting?database_name={database_name}&pretty'
Result:
{
"default#book" : {
"number_of_shards" : 1,
"creation_date" : "2023-06-15 11:42:25",
"number_of_replicas" : 1,
"data_center" : "DEFAULT",
"dc_affinity" : false,
"disaster_preparedness" : false,
"scatter_replica" : false
}
}
Parameter description:
Parameters | Description | Required |
---|---|---|
table | Table to be matched, supports using asterisk (*) wildcard character and specifying multiple pattens, which are separated by comma (,) | No, defaults to *, gets all table information of current database |
database_name | The database where the table is located | No, defaults to "default" database |
Update Table Configuration
Users can use the following commands to update table configuration.
curl -u shiva:shiva -XPUT 'localhost:8902/hippo/v1/{table}/_settings?database_name={database_name}&pretty' -H 'Content-Type: application/json' -d'{
"number_of_replicas" : 1,
"data_center" : "beijing",
"disaster_preparedness" : true,
"scatter_replica" : true,
"dc_affinity" : true,
"tag" : "newTag",
"tag.clear" : true,
"embedding.segment.max_size_mb" : 512,
"embedding.segment.seal_proportion" : 0.2,
"embedding.segment.max_deletion_proportion" : 0.1
}';
Result:
{
"acknowledged" : true
}
Parameter description:
Parameters | Description | Required |
---|---|---|
table | Table to be matched, supports using asterisk (*) wildcard character and specifying multiple pattens, which are separated by comma (,) | Yes |
database_name | The database where the table is located | No, defaults to "default" database |