Tejaskriya Madhan created HDDS-11546:
----------------------------------------

             Summary: Implement regex matching operation for --filter option of 
ldb scan command
                 Key: HDDS-11546
                 URL: https://issues.apache.org/jira/browse/HDDS-11546
             Project: Apache Ozone
          Issue Type: Sub-task
            Reporter: Tejaskriya Madhan
            Assignee: Tejaskriya Madhan


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

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.

 
{code:java}
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'.{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to