[ 
https://issues.apache.org/jira/browse/CASSANDRA-17568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525975#comment-17525975
 ] 

Tibor Repasi commented on CASSANDRA-17568:
------------------------------------------

With this 
[commit|https://github.com/apache/cassandra/pull/1580/commits/a759f9cb65bbd0a4620bcc7c6442a14e41507dd8]
 I've added a raw implementation of an {{--list-orphans}} option which is 
traversing all {{data_file_directories}} recursively in a depth of 2 and 
listing all paths which are not known to be used for tables.

However, it does correctly list empty keyspace directories and dropped tables, 
I have some objections:
# there is a {{system/_paxos_repair_state}} directory (I'm not familiar with) 
which is always listed; probably we would need a static exclude list
# nodetool is a tool which is intended to interact with a Cassandra process via 
JMX, this feature is interacting primarily with the filesystem

Therefore I don't really like this feature, it feels wrong, I would not unhappy 
to revert it.

> Implement nodetool command to list data directories of existing tables
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-17568
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17568
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tool/nodetool
>            Reporter: Tibor Repasi
>            Assignee: Tibor Repasi
>            Priority: Normal
>             Fix For: 4.x
>
>          Time Spent: 9h
>  Remaining Estimate: 0h
>
> When a table is created, dropped and re-created with the same name, 
> directories remain within data paths. Operators may be challenged finding out 
> which directories belong to existing tables and which may be subject to 
> removal. However, the information is available in CQL as well as in MBeans 
> via JMX, a convenient access to this information is still missing.
> My proposal is a new nodetool subcommand allowing to list data paths of all 
> existing tables.
> {code}
> % bin/nodetool datapaths -- example
> Keyspace : example
>       Table : test
>       Paths :
>               
> /var/lib/cassandra/data/example/test-02f5b8d0c0e311ecb327ff24df5ab301
> ----------------
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to