[
https://issues.apache.org/jira/browse/CASSANDRA-6962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuki Morishita updated CASSANDRA-6962:
--------------------------------------
Attachment: 6962-2.1.txt
Patch attached with unit test.
I ended up the following naming convention/directory structure:
{code}
/var/lib/cassandra/data/ks/cf-a85fc210cb1011e3a15f9d25721dbb44
/.idx
ka-1-Data.db
...
/snapshots
/my_snapshot
/.idx
ka-1-Data.db
...
ka-1-Data.db
...
/backups
/.idx
ka-1-Data.db
...
ka-1-Data.db
...
ka-1-Data.db
...
ks-cf-jb-123-Data.db (Older version can co exist)
ks-cf.idx-jb-2-Data.db
{code}
Highlight:
* Keyspace/ColumnFamily name is omitted from filename.
* If it is 'temporary' file, then file name would be 'tmp-ka-1-Data.db'.
* Each secondary index has its own SSTable directory whose name starts with
'.'. This is to distinguish from snapshots/backup directories.
* Older version of SSTable file can co-exist along with new directory structure.
> examine shortening path length post-5202
> ----------------------------------------
>
> Key: CASSANDRA-6962
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6962
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: Brandon Williams
> Assignee: Yuki Morishita
> Fix For: 2.1 beta2
>
> Attachments: 6962-2.1.txt
>
>
> From CASSANDRA-5202 discussion:
> {quote}
> Did we give up on this?
> Could we clean up the redundancy a little by moving the ID into the directory
> name? e.g., ks/cf-uuid/version-generation-component.db
> I'm worried about path length, which is limited on Windows.
> Edit: to give a specific example, for KS foo Table bar we now have
> /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/foo-bar-ka-1-Data.db
> I'm proposing
> /var/lib/cassandra/flush/foo/bar-2fbb89709a6911e3b7dc4d7d4e3ca4b4/ka-1-Data.db
> {quote}
--
This message was sent by Atlassian JIRA
(v6.2#6252)