Hippo heap table is organized as a Log-Structured Merge-Tree (“LSM-Tree”). When performing large amount of delete or update operations, users can use below command to compact heap table manually to improve performance.
curl -u shiva:shiva -XPOST 'localhost:8902/hippo/v1/{table}/_compact_db?database_name={database_name}&pretty' -H 'Content-Type: application/json' -d'{
"wait_for_completion" : true,
"timeout" : "2m"
}';
Result:
{
"job_id" : "537b0b0e1c444ceda85f650c3c3d2f02",
"job_status" : "SHIVA_JOB_SUCCESS",
"task_results" : [
{
"id" : "c5a084a2c6674eae9c3c913354b189eb",
"status" : "TASK_SUCCESS",
"server" : "tw-node48:8702",
"execute_time" : 0.003
}
]
}
Parameter description:
Parameters | Description | Required |
---|---|---|
database_name | Database where the destination table is located | No, defaults to "default" database |
table_name | Destination table name | Yes |
wait_for_completion | Whether to wait until the job is done | No, defaults to true |
timeout | Operation timeout | No, defaults to 5 mins |