[ https://issues.apache.org/jira/browse/HDDS-6064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Siyao Meng updated HDDS-6064: ----------------------------- Summary: Print proper JSON from `ozone debug ldb scan` (was: `ozone debug ldb` should print proper JSON with `--with-keys=true`) > Print proper JSON from `ozone debug ldb scan` > --------------------------------------------- > > Key: HDDS-6064 > URL: https://issues.apache.org/jira/browse/HDDS-6064 > Project: Apache Ozone > Issue Type: Sub-task > Reporter: Siyao Meng > Assignee: Keyi Song > Priority: Minor > Labels: newbie, pull-request-available > > With {{--with-keys=false}}, command prints proper JSON: > {code} > $ ozone debug ldb --db=/data/metadata/om.db scan --column_family=userTable > 2021-03-20 16:35:03,021 [main] INFO codec.RepeatedOmKeyInfoCodec: > RepeatedOmKeyInfoCodec ignorePipeline = true > 2021-03-20 16:35:03,029 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > 2021-03-20 16:35:03,029 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > Added definition for table:deletedTable > ... > { > "unknownFields": { > "fields": {} > }, > "bitField0_": 3, > "volumeNames_": [ > "s3v", > "vol1" > ], > "objectID_": -4611686018427388160, > "updateID_": 1, > "memoizedIsInitialized": 1, > "memoizedSerializedSize": -1, > "memoizedHashCode": 0, > "memoizedSize": -1 > } > {code} > However, with {{--with-keys=true}}, command no longer prints proper JSON: > {code} > $ ozone debug ldb --db=/data/metadata/om.db scan > --column_family=tenantAccessIdTable --with-keys > 2021-11-30 20:28:11,358 [main] INFO codec.RepeatedOmKeyInfoCodec: > RepeatedOmKeyInfoCodec ignorePipeline = true > 2021-11-30 20:28:11,366 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > 2021-11-30 20:28:11,366 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > 2021-11-30 20:28:11,378 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > 2021-11-30 20:28:11,378 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > 2021-11-30 20:28:11,378 [main] INFO codec.OmKeyInfoCodec: OmKeyInfoCodec > ignorePipeline = true > Added definition for table:deletedTable > ... > "tenantone$testuser" -> { > "tenantId": "tenantone", > "userPrincipal": "testuser", > "secretKey": "secretKey1", > "isAdmin": false, > "isDelegatedAdmin": false > } > {code} > Goal: > When {{--with-keys=true}}, the output should be a JSON map. e.g. > {code} > { > "tenantone$testuser": { > "tenantId": "tenantone", > "userPrincipal": "testuser", > "secretKey": "secretKey1", > "isAdmin": false, > "isDelegatedAdmin": false > } > } > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org