[
https://issues.apache.org/jira/browse/HDDS-10608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17834668#comment-17834668
]
Mohammad Arafat Khan edited comment on HDDS-10608 at 4/7/24 11:50 AM:
----------------------------------------------------------------------
For pagination in the Recon API, it's implemented through the use of an offset
value, also known as the *prevKey* or last key, alongside a *limit* parameter
that specifies the page size. To effectively use pagination, it's necessary to
include this prevKey in the JSON output. This allows for the retrieval of the
subsequent set of records.
We will have to expose the last key in the json output through this Jira so
that the UI can utilise it.
was (Author: JIRAUSER284839):
For pagination in the Recon API, it's implemented through the use of an offset
value, also known as the *prevKey* or last key, alongside a *limit* parameter
that specifies the page size. To effectively use pagination, it's necessary to
include this prevKey in the JSON output. This allows for the retrieval of the
subsequent set of records.
We will have to expose the last key in the json output through this Jira so
that the UI can utilise it.
> Recon can't get full key when using Recon API
> ---------------------------------------------
>
> Key: HDDS-10608
> URL: https://issues.apache.org/jira/browse/HDDS-10608
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Reporter: Conway Zhang
> Assignee: Mohammad Arafat Khan
> Priority: Blocker
>
> When I use the Recon API to retrieve Ozone key information, there is a
> problem. The information obtained is not the same as when using the Ozone
> client; the full key name is not retrieved via the Recon API.
> This issue exists across all Recon APIs.
> *such as :*
> *use ozone client:*
> ozone sh key info s3v/bkt3/zhang/kang/wei/hosts
> ```
> {
> "volumeName" : "s3v",
> "bucketName" : "bkt3",
> "name" : "zhang/kang/wei/hosts",
> "dataSize" : 305,
> "creationTime" : "2024-03-26T11:36:00.021Z",
> "modificationTime" : "2024-03-26T11:36:03.874Z",
> "replicationConfig" : {
> "replicationFactor" : "THREE",
> "requiredNodes" : 3,
> "replicationType" : "RATIS"
> },
> "metadata" : { },
> "ozoneKeyLocations" : [ {
> "containerID" : 4,
> "localID" : 113750153625607001,
> "length" : 305,
> "offset" : 0,
> "keyOffset" : 0
> } ],
> "file" : true
> }
> ```
> *use recon api:*
> curl http://ozoneReconAddress:9888/api/v1/containers/4/keys | grep hosts
> ```
> {
> "Volume": "s3v",
> "Bucket": "bkt3",
> "Key": "hosts",
> "DataSize": 305,
> "Versions": [
> 0
> ],
> "Blocks": {
> "0": [
> {
> "containerID": 4,
> "localID": 113750153625607001
> }
> ]
> },
> "CreationTime": "2024-03-26T11:36:00.021Z",
> "ModificationTime": "2024-03-26T11:36:03.874Z"
> }
> ```
> In the above example ,recon api should show "Key": "zhang/kang/wei/hosts"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]