Viewing table maintenance status

You can verify the table maintenance action status using CLI or REST APIs.

  1. Verify table maintenance status using the CLI.

    Use list-tasks to list maintenance tasks for a namespace and get-table-status-details for table-level status. For command syntax, see Cli Manage Monitor and Running policies on demand using the CLI.

  2. Verify table maintenance status using REST APIs:
    1. Fetch the submitted task details for a specific policy and tables using the GET /tasks/policies/{policyName}/tables/{tableName}/submitted API.
    2. Monitor the status of all the tasks using the GET /tasks API. You can fetch the task metadata of a specific task ID using the GET /tasks/id/{id} API.
      The following sample snippet shows the response for the 019348e0-2d6f-7997-b117-8441d8d757a6 taskID.
      {
          "status": 200,
          "action": "READ",
          "message": "Success",
          "result": [
              {
                  "taskId": "019348e0-2d6f-7997-b117-8441d8d757a6",
                  "createAt": "2024-11-20T09:21:11.534Z",
                  "createdBy": 1,
                  "tablePath": ".default.itest",
                  "policyName": "ClouderaAdaptive",
                  "policyVersion": "0be2a330-0282-56d6-bbc4-67c96ad7e9c0",
                  "currentAction": "EXPIRE_SNAPSHOT",
                  "actions": {
                      "EXPIRE_SNAPSHOT": {
                          "result": {
                              "deletedDataFilesCount": 0.0,
                              "deletedEqualityDeleteFilesCount": 0.0,
                              "deletedPositionDeleteFilesCount": 0.0,
                              "deletedManifestsCount": 0.0,
                              "deletedManifestListsCount": 4.0,
                              "deletedStatisticsFilesCount": 0.0 
                          },
                          "sparkMetrics": {
                              "jvmGcTime": 4637.0,
                              "totalBytesRead": 65983.0,
                              "totalBytesWritten": 0.0,
                              "taskCount": 610.0,
                              "executorCpuTime": 3.4583323352E10
                          },
                          "sparkRuntime": {
                              "applicationId": "application_1732084186181_0015",
                              "jobIds": [
                                  9.0,
                                  10.0,
                                  11.0,
                                  12.0,
                                  13.0,
                                  14.0
                              ]
                          },
                          "status": "Success"
                      }
                  },
                  "status": "SUBMITTED"
              }
          ]
      }
      
    3. Verify whether the statistics improved after the maintenance actions completed using the GET /tables/{tableId}/stats API.