Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-11377 ozone ldb command support for rocksdb
  3. HDDS-11546

Implement regex matching operation for --filter option of ldb scan command

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None

    Description

      Currently, `ozone debug ldb scan` command has a `--filter` option supporting the following operations for the records stored in the rocksDB: `EQUALS, LESSER, GREATER`.

      Adding support for matching with regex will be useful while debugging as any pattern of keys can be found with it.

      For example, if a value has many fields like [name, location->[address, DN, IP], version, lastUpdateTime]:

      using the option `--filter={name:regex:^a.*}` will display records with name that start with the letter 'a'

      A fields along with the regex that should be used to is given to the command, and only those records passing the condition it will be shown.

       

      eg.) ozone debug ldb --db=/data/metadata/om.db scan --cf=volumeTable --filter="usedNamespace:greater:2,adminName:regex:^a.*a$" 
      
      --> Will show only the records having usedNamespace>2 and adminName starting and ending with the letter 'a'.

       

      Attachments

        Issue Links

          Activity

            People

              tejaskriya09 Tejaskriya Madhan
              tejaskriya09 Tejaskriya Madhan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: