imay commented on a change in pull request #4312: URL: https://github.com/apache/incubator-doris/pull/4312#discussion_r468453107
########## File path: docs/en/administrator-guide/http-actions/compaction-action.md ########## @@ -95,4 +95,96 @@ curl -X GET http://192.168.10.24:8040/api/compaction/show?tablet_id=10015\&schem ## Manually trigger Compaction -(TODO) +``` +curl -X POST http://be_host:webserver_port/api/compaction/run?tablet_id=xxxx\&schema_hash=yyyy\&compact_type=cumulative +``` + +The only one manual compaction task that can be performed at a moment, and the value range of compact_type is base or cumulative + +If the tablet does not exist, an error in JSON format is returned: + +``` +{ + "status": "Fail", + "msg": "Tablet not found" +} +``` + +If the compaction execution task fails to be triggered, an error in JSON format is returned: + +``` +{ + "status": "Fail", + "msg": "fail to execute compaction, error = -2000" +} +``` + +If the compaction execution task successes to be triggered, an error in JSON format is returned: + +``` +{ + "status": "Success", + "msg": "compaction task is successfully triggered." +} +``` + +Explanation of results: + +* status: Trigger task status, when it is successfully triggered, it is Success; when for some reason (for example, the appropriate version is not obtained), it returns Fail. +* msg: Give specific success or failure information. + +### Examples + +``` +curl -X POST http://192.168.10.24:8040/api/compaction/run?tablet_id=10015\&schema_hash=1294206575\&compact_type=cumulative +``` + +## Manual Compaction execution status + +``` +curl -X GET http://be_host:webserver_port/api/compaction/run?tablet_id=xxxx\&schema_hash=yyyy Review comment: ```suggestion curl -X GET http://be_host:webserver_port/api/compaction/run_status?tablet_id=xxxx\&schema_hash=yyyy ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org