Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
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:
$ 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 } ]
and call
http://localhost:9888/api/v1/keys/listKeys?startPrefix=/vol1/bucket2&limit=1000
This will return an error:
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"])
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().
Attachments
Issue Links
- links to