sarvekshayr commented on code in PR #256:
URL: https://github.com/apache/ozone-site/pull/256#discussion_r2723589457


##########
docs/05-administrator-guide/03-operations/11-tools/README.mdx:
##########
@@ -0,0 +1,59 @@
+---
+sidebar_label: Tools
+---
+
+import DocCardList from "@theme/DocCardList";
+
+# Tools
+
+Ozone provides a set of command-line tools that can be used to manage and 
operate an Ozone cluster.
+
+All commands are invoked via the `ozone` script.
+
+---
+
+## Daemon commands
+
+Commands used to start or stop Ozone services.
+
+- **`scm`** – Storage Container Manager service
+- **`om`** – Ozone Manager service
+- **`datanode`** – HDDS DataNode service
+- **`s3g`** – S3-compatible REST gateway
+- **`recon`** – Recon Web UI service
+- **`httpfs`** – HttpFS gateway
+
+---
+
+## Client commands
+
+- **`sh`** – Manage volumes, buckets, and keys
+- **`fs`** – Ozone filesystem commands (similar to `hdfs dfs`)
+- **`version`** – Print Ozone and HDDS version information
+
+---
+
+## Admin commands
+
+- **`admin`** – Admin and developer commands for Ozone components
+- **`insight`** – Display filtered logs, metrics, or configs for debugging
+- **`classpath`** – Print Hadoop classpath
+- **`dtutil`** – Delegation token operations
+- **`envvars`** – Display computed Hadoop environment variables
+- **`getconf`** – Read Ozone configuration values
+- **`genconf`** – Generate minimal `ozone-site.xml`
+
+---
+
+## Test tools
+
+- **`freon`** – Ozone load generator
+
+---
+
+## Snapshots
+
+This section documents how to manage and configure Ozone snapshots.

Review Comment:
   This is not relevant here. Please remove it.



##########
docs/05-administrator-guide/03-operations/11-tools/03-ozone-debug/01-ldb-tool.md:
##########
@@ -0,0 +1,227 @@
+# LDB Tool

Review Comment:
   We already have an LDB page - 
https://ozone-site-v2.staged.apache.org/docs/administrator-guide/operations/ldb
   
   Please move it here instead.



##########
docs/05-administrator-guide/03-operations/11-tools/03-ozone-debug/01-ldb-tool.md:
##########
@@ -0,0 +1,227 @@
+# LDB Tool
+
+Ozone heavily uses RocksDB for storing metadata. This tool helps parse the 
contents of RocksDB belonging to Ozone Roles.
+Supported DB’s : Ozone Manager (OM.db) , StorageContainerManager (SCM.db), 
Datanode/Container (container.db)
+Below is the usage:
+
+```bash
+Usage: ozone debug ldb --db=<dbPath> [COMMAND]
+Parse rocksdb file content
+      --db=<dbPath>   Database File Path
+Commands:
+  scan                      Parse specified metadataTable
+  list_column_families, ls  list all column families in db.
+  value-schema              Schema of value in metadataTable
+  checkpoint                Create checkpoint for specified db
+```
+
+## list_column_families command
+
+`list_column_families` command lists all the column families in the db 
provided.
+
+```bash
+$ ozone debug ldb --db=/path/to/scm.db ls
+default
+sequenceId
+revokedCertsV2
+pipelines
+crls
+crlSequenceId
+meta
+containers
+validCerts
+validSCMCerts
+scmTransactionInfos
+deletedBlocks
+statefulServiceConfig
+revokedCerts
+move
+```
+
+## scan command
+
+`scan` command parses a particular column family of a RocksDB provided and 
prints the records.
+
+```bash
+Usage: ozone debug ldb scan [--compact] [--count] [--with-keys]
+                            [--batch-size=<batchSize>] --cf=<tableName>
+                            [--cid=<containerId>] [-d=<dnDBSchemaVersion>]
+                            [-e=<endKey>] [--fields=<fieldsFilter>]
+                            [--filter=<filter>] [-l=<limit>] [-o=<fileName>]
+                            [-s=<startKey>] [--thread-count=<threadCount>]
+Parse specified metadataTable
+      --batch-size=<batchSize>
+                          Batch size for processing DB data.
+      --cf, --column_family, --column-family=<tableName>
+                          Table name
+      --cid, --container-id=<containerId>
+                          Container ID. Applicable if datanode DB Schema is V3
+      --compact           disable the pretty print the output
+      --count, --show-count
+                          Get estimated key count for the given DB column 
family
+                            Default: false
+  -d, --dnSchema, --dn-schema=<dnDBSchemaVersion>
+                          Datanode DB Schema Version: V1/V2/V3
+  -e, --ek, --endkey=<endKey>
+                          Key at which iteration of the DB ends
+      --fields=<fieldsFilter>
+                          Comma-separated list of fields needed for each value.
+                            eg.) "name,acls.type" for showing name and type
+                            under acls.
+      --filter=<filter>   Comma-separated list of "<field>:<operator>:<value>"
+                            where <field> is any valid field of the record,
+                            <operator> is [EQUALS,LESSER, GREATER or REGEX].
+                            (EQUALS compares the exact string, REGEX compares
+                            with a valid regular expression passed, and
+                            LESSER/GREATER works with numeric values), <value>
+                            is the value of the field.
+                          eg.) "dataSize:equals:1000" for showing records
+                            having the value 1000 for dataSize,
+                               "keyName:regex:^key.*$" for showing records
+                            having keyName that matches the given regex.
+  -l, --limit, --length=<limit>
+                          Maximum number of items to list.
+  -o, --out=<fileName>    File to dump table scan data
+  -s, --sk, --startkey=<startKey>
+                          Key from which to iterate the DB
+      --thread-count=<threadCount>
+                          Thread count for concurrent processing.
+      --with-keys         Print a JSON object of key->value pairs (default)
+                            instead of a JSON array of only values.
+```
+
+By default, the contents are printed on the console, but it can be redirected 
to a file using the `--out` option. <br />
+`--length` can be used to limit the number of records being printed. <br />
+`--count` doesn’t print the records, it shows the approximate number of 
records. This is not accurate. <br />
+`ozone debug ldb scan` command provides many filtering options to make 
debugging easier, elaborated below: <br />
+
+> Multiple filtering options can be used together in a single command.
+
+### –startkey and –endkey

Review Comment:
   Use double dash before these options. Applies to `--fields` and `--filter` 
as well.
   ```suggestion
   ### --startkey and --endkey
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to