XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      With --with-keys=false, command prints proper JSON:

      $ 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
      }
      

      However, with --with-keys=true, command no longer prints proper JSON:

      $ 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
      }
      

      Goal:

      When --with-keys=true, the output should be a JSON map. e.g.

      {
      "tenantone$testuser": {
        "tenantId": "tenantone",
        "userPrincipal": "testuser",
        "secretKey": "secretKey1",
        "isAdmin": false,
        "isDelegatedAdmin": false
      }
      }
      

      Attachments

        Issue Links

          Activity

            People

              sky76093016 Keyi Song
              smeng Siyao Meng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: