[
https://issues.apache.org/jira/browse/CASSANDRA-21129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Abhijeet Dubey updated CASSANDRA-21129:
---------------------------------------
Test and Documentation Plan:
Unit tests, manual tests
------------------------------
bin/cassandra -f bin/cqlsh -e "CREATE KEYSPACE test_ks WITH replication =
\{'class': 'SimpleStrategy', 'replication_factor': 1};" conda activate
cassandra-oss bin/cqlsh -e "CREATE KEYSPACE test_ks WITH replication =
\{'class': 'SimpleStrategy', 'replication_factor': 1};"
"CREATE KEYSPACE test_ks WITH replication = \{'class': 'SimpleStrategy',
'replication_factor': 1};" bin/cqlsh -e "CREATE TABLE test_ks.test_table (id
int PRIMARY KEY, name text);"
tools/bin/tcmdump dump --help
Usage: tcmdump dump [-v] [--debug] [--dump-distributed-log] [--dump-log]
[--to-string] [-d=<dataDir>] [--epoch=<targetEpoch>]
[--from-epoch=<fromEpoch>] [-o=<outputFile>]
[-p=<partitioner>] [--to-epoch=<toEpoch>]
[-s=<sstables>...]...
Dump cluster metadata from SSTables
-d, --data-dir=<dataDir> Data directory containing system keyspace
--debug Show stack traces on errors
--dump-distributed-log Dump distributed_metadata_log (for CMS nodes)
--dump-log Dump log entries (toString each entry)
--epoch=<targetEpoch> Show state at specific epoch
--from-epoch=<fromEpoch>
Filter log entries from this epoch
-o, --output=<outputFile> Output file path for binary dump (default: temp
file)
-p, --partitioner=<partitioner>
Partitioner class name
-s, --sstables=<sstables>...
Path to SSTable directory for metadata tables (can
be specified multiple times for log and snapshot
tables)
--to-epoch=<toEpoch> Filter log entries to this epoch
--to-string Print ClusterMetadata.toString() to stdout
-v, --verbose Verbose output
tools/bin/tcmdump dump --data-dir data/data --to-string --verbose
tools/bin/tcmdump dump --data-dir data/data --verbose
tools/bin/tcmdump dump --data-dir data/data --dump-log --to-epoch 2 --verbose
tools/bin/tcmdump dump --data-dir data/data --dump-log --verbose
was:
Unit tests, manual tests
------------------------------
bin/cassandra -f bin/cqlsh -e "CREATE KEYSPACE test_ks WITH replication =
\{'class': 'SimpleStrategy', 'replication_factor': 1};" conda activate
cassandra-oss bin/cqlsh -e "CREATE KEYSPACE test_ks WITH replication =
\{'class': 'SimpleStrategy', 'replication_factor': 1};"
"CREATE KEYSPACE test_ks WITH replication = \{'class': 'SimpleStrategy',
'replication_factor': 1};" bin/cqlsh -e "CREATE TABLE test_ks.test_table (id
int PRIMARY KEY, name text);"
sstablemetadatadump dump --data-dir /path/to/data --text --all
sstablemetadatadump dump --data-dir /path/to/data --to-string
sstablemetadatadump dump --sstables /path/to/system/local_metadata_log-xxx/
--epochs
> Tool to offline-dump the cluster metadata from an instance
> ----------------------------------------------------------
>
> Key: CASSANDRA-21129
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21129
> Project: Apache Cassandra
> Issue Type: New Feature
> Components: Transactional Cluster Metadata
> Reporter: Abhijeet Dubey
> Assignee: Abhijeet Dubey
> Priority: Normal
> Attachments: sample_output.txt
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When a Cassandra node fails to start due to Transactional Cluster Metadata
> (TCM/CEP-21) corruption or issues, operators need a way to inspect the
> cluster metadata state offline without starting the node. The existing tools
> (nodetool, cqlsh) require a running node, leaving operators blind when
> debugging startup failures.
>
> When a node fails to start due to TCM corruption or inconsistencies,
> operators have no way to inspect the metadata state without a running node.
> This tool fills that gap by reading directly from SSTables.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]