View Compaction Status

Request

GET /api/compaction/run_status GET /api/compaction/show?tablet_id={int}

Description

It is used to view the overall compaction status of a BE node and the compaction status of a specified tablet.

Query parameters

  • tablet_id ID of the tablet

Request body

None

Response

The overall compaction status of the node

  1. {
  2. "CumulativeCompaction": {
  3. "/home/disk1" : [10001, 10002],
  4. "/home/disk2" : [10003]
  5. },
  6. "BaseCompaction": {
  7. "/home/disk1" : [10001, 10002],
  8. "/home/disk2" : [10003]
  9. }
  10. }

This structure represents the id of the tablet that is performing the compaction task in a certain data directory, and the type of compaction.

Specify the compaction status of the tablet

  1. {
  2. "cumulative policy type": "SIZE_BASED",
  3. "cumulative point": 50,
  4. "last cumulative failure time": "2019-12-16 18:13:43.224",
  5. "last base failure time": "2019-12-16 18:13:23.320",
  6. "last cumu success time": ,
  7. "last base success time": "2019-12-16 18:11:50.780",
  8. "rowsets": [
  9. "[0-48] 10 DATA OVERLAPPING 574.00 MB",
  10. "[49-49] 2 DATA OVERLAPPING 574.00 B",
  11. "[50-50] 0 DELETE NONOVERLAPPING 574.00 B",
  12. "[51-51] 5 DATA OVERLAPPING 574.00 B"
  13. ],
  14. "missing_rowsets": [],
  15. "stale version path": [
  16. {
  17. "path id": "2",
  18. "last create time": "2019-12-16 18:11:15.110 +0800",
  19. "path list": "2-> [0-24] -> [25-48]"
  20. },
  21. {
  22. "path id": "1",
  23. "last create time": "2019-12-16 18:13:15.110 +0800",
  24. "path list": "1-> [25-40] -> [40-48]"
  25. }
  26. ]
  27. }

Explanation of results:

  • cumulative policy type: The cumulative compaction policy type which is used by current tablet.
  • cumulative point: The version boundary between base and cumulative compaction. Versions before (excluding) points are handled by base compaction. Versions after (inclusive) are handled by cumulative compaction.
  • last cumulative failure time: The time when the last cumulative compaction failed. After 10 minutes by default, cumulative compaction is attempted on the this tablet again.
  • last base failure time: The time when the last base compaction failed. After 10 minutes by default, base compaction is attempted on the this tablet again.
  • rowsets: The current rowsets collection of this tablet. [0-48] means a rowset with version 0-48. The second number is the number of segments in a rowset. The DELETE indicates the delete version. OVERLAPPING and NONOVERLAPPING indicates whether data between segments is overlap.
  • missing_rowset: The missing rowsets.
  • stale version path: The merged version path of the rowset collection currently merged in the tablet. It is an array structure and each element represents a merged path. Each element contains three attributes: path id indicates the version path id, and last create time indicates the creation time of the most recent rowset on the path. By default, all rowsets on this path will be deleted after half an hour at the last create time.

Examples

  1. curl http://192.168.10.24:8040/api/compaction/show?tablet_id=10015