[
https://issues.apache.org/jira/browse/HDDS-11848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai resolved HDDS-11848.
-------------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
> Serialisation bug in Recon's listKeys API
> -----------------------------------------
>
> Key: HDDS-11848
> URL: https://issues.apache.org/jira/browse/HDDS-11848
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Reporter: Siddhant Sangwan
> Assignee: Siddhant Sangwan
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.0.0
>
>
> The listKeys API returns an error response when the /api/v1/keys/listKeys
> endpoint on port 9888 is used.
> To reproduce, create a volume, bucket, and key:
> {code}
> $ ozone sh key list /vol1/bucket2
> [ {
> "volumeName" : "vol1",
> "bucketName" : "bucket2",
> "name" : "key",
> "owner" : "hadoop",
> "dataSize" : 4068,
> "creationTime" : "2024-12-03T10:04:58.063Z",
> "modificationTime" : "2024-12-03T10:04:58.629Z",
> "replicationConfig" : {
> "replicationFactor" : "ONE",
> "requiredNodes" : 1,
> "minimumNodes" : 1,
> "replicationType" : "RATIS"
> },
> "metadata" : { },
> "tags" : { },
> "file" : true
> } ]
> {code}
> and call
> {code}
> http://localhost:9888/api/v1/keys/listKeys?startPrefix=/vol1/bucket2&limit=1000
> {code}
> This will return an error:
> {code}
> Conflicting/ambiguous property name definitions (implicit name 'key'): found
> multiple explicit names: [key, isKey], but also implicit accessor: [method
> org.apache.hadoop.ozone.recon.api.types.KeyEntityInfoProtoWrapper#setKey(java.lang.String)][visible=true,ignore=false,explicitName=false]
> (through reference chain:
> org.apache.hadoop.ozone.recon.api.types.ListKeysResponse["keys"])
> {code}
> KeyEntityInfoProtoWrapper has two fields, key and isKey. isKey has a
> corresponding getter called isKey(). Jackson finds these three ambiguous,
> even though they're annotated. The fix is to change isKey() to getIsKey().
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]