devmadhuu commented on code in PR #10240:
URL: https://github.com/apache/ozone/pull/10240#discussion_r3273948666


##########
hadoop-hdds/docs/content/interface/ReconApi.md:
##########
@@ -451,51 +598,126 @@ Returns set of keys/files pending for deletion.
 
 **Returns**
 
-   Returns set of directories pending for deletion.
+Returns the set of directories pending for deletion. Each entry in 
`deletedDirInfo` is a
+`KeyEntityInfo` describing one pending-delete directory (not a 
`RepeatedOmKeyInfo` like
+`/keys/deletePending`).
 
 ```json
 {
-  "lastKey": "vol1/bucket1/bucket1/dir1",
-  "replicatedTotal": -1530804718628866300,
-  "unreplicatedTotal": -1530804718628866300,
-  "deletedkeyinfo": [
+  "lastKey": "/vol1/bucket1/dir1",
+  "replicatedDataSize": 13824,
+  "unreplicatedDataSize": 4608,
+  "deletedDirInfo": [
     {
-      "omKeyInfoList": [
-        {
-          "metadata": {},
-          "objectID": 0,
-          "updateID": 0,
-          "parentObjectID": 0,
-          "volumeName": "sampleVol",
-          "bucketName": "bucketOne",
-          "keyName": "key_one",
-          "dataSize": -1530804718628866300,
-          "keyLocationVersions": [],
-          "creationTime": 0,
-          "modificationTime": 0,
-          "replicationConfig": {
-            "replicationFactor": "ONE",
-            "requiredNodes": 1,
-            "replicationType": "STANDALONE"
-          },
-          "fileChecksum": null,
-          "fileName": "key_one",
-          "acls": [],
-          "path": "0/key_one",
-          "file": false,
-          "latestVersionLocations": null,
-          "replicatedSize": -1530804718628866300,
-          "fileEncryptionInfo": null,
-          "objectInfo": "OMKeyInfo{volume='sampleVol', bucket='bucketOne', 
key='key_one', dataSize='-1530804718628866186', creationTime='0', objectID='0', 
parentID='0', replication='STANDALONE/ONE', fileChecksum='null}",
-          "updateIDset": false
-        }
-      ]
+      "key": "/-9223372036854775552/-9223372036854774016/dir1",
+      "path": "/vol1/bucket1/dir1",
+      "inStateSince": 1717000000000,
+      "size": 4608,
+      "replicatedSize": 13824,
+      "replicationInfo": {
+        "replicationFactor": "THREE",
+        "requiredNodes": 3,
+        "replicationType": "RATIS"
+      },
+      "creationTime": 1716900000000,
+      "modificationTime": 1716999999999,
+      "isKey": false
     }
   ],
   "status": "OK"
 }
 ```
 
+### GET /api/v1/keys/deletePending/summary
+
+**Returns**
+
+Returns a flat summary of all keys pending deletion across the cluster.
+
+```json
+{
+  "totalDeletedKeys": 8,
+  "totalReplicatedDataSize": 90000,
+  "totalUnreplicatedDataSize": 30000
+}
+```
+
+### GET /api/v1/keys/deletePending/dirs/summary
+
+**Returns**
+
+Returns the total count of directories pending deletion.
+
+```json
+{
+  "totalDeletedDirectories": 5
+}
+```
+
+### GET /api/v1/keys/listKeys
+
+**Parameters**
+
+* startPrefix (required)

Review Comment:
   startPrefix marked required: true, but it is actually not. Java uses 
`@DefaultValue(OM_KEY_PREFIX)`, so the parameter has a default at the HTTP 
level.



##########
hadoop-hdds/docs/content/interface/ReconApi.md:
##########
@@ -231,26 +239,99 @@ Returns the UnhealthyContainerMetadata objects for all 
the unhealthycontainers.
 ```
 
 ### GET /api/v1/containers/unhealthy/:state
- 
+
 **Parameters**
 
-* batchNum (optional)
-     
-   The batch number (like "page number") of results to return.
-   Passing 1, will return records 1 to limit. 2 will return
-   limit + 1 to 2 * limit, etc.
- 
 * limit (optional)
 
-   Only returns the limited number of results. The default limit is 1000.  
+   Only returns the limited number of results. The default limit is 1000.
+
+* maxContainerId (optional)
+
+   Upper bound for container IDs (exclusive). When specified, returns 
containers with IDs less
+   than this value in descending order. Use it for backward pagination.
+
+* minContainerId (optional)
+
+   Lower bound for container IDs (exclusive). When `maxContainerId` is not 
specified, returns
+   containers with IDs greater than this value in ascending order. Use it for 
forward pagination.
 
 **Returns**
 
 Returns the UnhealthyContainerMetadata objects for the containers in the given 
state.
-Possible unhealthy container states are `MISSING`, 
`MIS_REPLICATED`,`UNDER_REPLICATED`, `OVER_REPLICATED`.
+Possible unhealthy container states are `MISSING`, `MIS_REPLICATED`, 
`UNDER_REPLICATED`, `OVER_REPLICATED`.
 The response structure is same as `/containers/unhealthy`.
 
 
+### GET /api/v1/containers/unhealthy/export
+
+**Returns**
+
+Lists every unhealthy-container export job currently tracked by Recon, in any 
status.
+Items are `ExportJob` objects (see schema below).
+
+```json
+[
+  {
+    "jobId": "4f7a8b9c-1234-5678-9abc-def012345678",
+    "state": "MISSING",
+    "status": "RUNNING",
+    "submittedAt": 1718640123456,
+    "startedAt": 1718640124000,
+    "completedAt": 0,
+    "totalRecords": 250,
+    "estimatedTotal": 1000,
+    "fileName": "",
+    "errorMessage": null,
+    "progressPercent": 25,
+    "queuePosition": 0,
+    "downloadCount": 0,
+    "downloadsRemaining": 3
+  }
+]
+```
+
+### POST /api/v1/containers/unhealthy/export
+
+**Parameters**
+
+* state (required)
+
+    One of `MISSING`, `MIS_REPLICATED`, `UNDER_REPLICATED`, `OVER_REPLICATED`.
+
+**Returns**
+
+Submits a new CSV export job and returns the `ExportJob` with the assigned 
`jobId`.
+The job initially has `status: QUEUED`.
+
+* `400 Bad Request`: `state` is missing or not a valid unhealthy state.
+* `429 Too Many Requests`: the export queue is full; retry later. Body: `{ 
"error": "Too Many Requests", "message": "<reason>" }`.
+
+### GET /api/v1/containers/unhealthy/export/:jobId
+
+**Returns**
+
+Returns the current `ExportJob` for the given `jobId`. `404 Not Found` if no 
job has that id.
+
+### GET /api/v1/containers/unhealthy/export/:jobId/download
+
+**Returns**
+
+Streams the TAR archive produced by the export job. Response `Content-Type` is 
`application/x-tar` with
+a `Content-Disposition: attachment` header carrying the export filename.
+
+* `404 Not Found`: `jobId` is unknown or the on-disk file was removed.
+* `409 Conflict`: the job has not reached `COMPLETED` status yet.
+* `429 Too Many Requests`: the per-job download limit has been reached. Body 
matches `RateLimitedError`.

Review Comment:
   The YAML's `RateLimitedError` schema shows error: "Too Many Requests" as the 
example value. The `startExport (POST) `endpoint does emit "Too Many Requests", 
but the `downloadExport (GET)` endpoint emits "Download limit reached"



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to