Compact Heap Table

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:

ParametersDescriptionRequired
database_nameDatabase where the destination table is locatedNo, defaults to "default" database
table_nameDestination table nameYes
wait_for_completionWhether to wait until the job is doneNo, defaults to true
timeoutOperation timeoutNo, defaults to 5 mins
Table 22 Compact Heap Table (Restful API)