POST /api/compaction/run?tablet_id={int}&compact_type={enum} POST /api/compaction/run?table_id={int}&compact_type=full Note that table_id=xxx will take effect only when compact_type=full is specified. GET /api/compaction/run_status?tablet_id={int}
Used to manually trigger the comparison and show status.
tablet_id
table_id
compact_type
base or cumulative or full. For usage scenarios of full_compaction, please refer to Data Recovery.None
If the tablet does not exist, an error in JSON format is returned:
{
"status": "Fail",
"msg": "Tablet not found"
}
If the tablet exists and the tablet is not running, JSON format is returned:
{
"status": "Fail",
"msg": "fail to execute compaction, error = -2000"
}
If the tablet exists and the tablet is running, JSON format is returned:
{
"status": "Success",
"msg": "compaction task is successfully triggered."
}
Explanation of results:
If the tablet does not exist, an error in JSON format is returned:
{
"status": "Fail",
"msg": "Tablet not found"
}
If the tablet exists and the tablet is not running, JSON format is returned:
{
"status" : "Success",
"run_status" : false,
"msg" : "this tablet_id is not running",
"tablet_id" : 11308,
"schema_hash" : 700967178,
"compact_type" : ""
}
If the tablet exists and the tablet is running, JSON format is returned:
{
"status" : "Success",
"run_status" : true,
"msg" : "this tablet_id is running",
"tablet_id" : 11308,
"schema_hash" : 700967178,
"compact_type" : "cumulative"
}
Explanation of results:
curl -X POST "http://127.0.0.1:8040/api/compaction/run?tablet_id=10015&compact_type=cumulative"