You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Carl Mueller <ca...@smartthings.com> on 2018/04/27 20:24:16 UTC

Determining active sstables and table- dir

IN cases where a table was dropped and re-added, there are now two table
directories with different uuids with sstables.

If you don't have knowledge of which one is active, how do you determine
which is the active table directory? I have tried cf_id from
system.schema_columnfamilies and that can work some of the time but have
seen times cf_id != table-<uuid>

I have also seen situations where sstables that don't have the
table/columnfamily are in the table dir and are clearly that active
sstables (they compacted when I did a nodetool compact)

Is there a way to get a running cassandra node's sstables for a given
keyspace/table and what table-<uuid> is active?

This is in a 2.2.x environment that has probably churned a bit from 2.1.x

Re: Determining active sstables and table- dir

Posted by Rahul Singh <ra...@gmail.com>.
Schema column families is the most authoritative. You may have different data directories.

--
Rahul Singh
rahul.singh@anant.us

Anant Corporation

On Apr 27, 2018, 1:24 PM -0700, Carl Mueller <ca...@smartthings.com>, wrote:
> IN cases where a table was dropped and re-added, there are now two table directories with different uuids with sstables.
>
> If you don't have knowledge of which one is active, how do you determine which is the active table directory? I have tried cf_id from system.schema_columnfamilies and that can work some of the time but have seen times cf_id != table-<uuid>
>
> I have also seen situations where sstables that don't have the table/columnfamily are in the table dir and are clearly that active sstables (they compacted when I did a nodetool compact)
>
> Is there a way to get a running cassandra node's sstables for a given keyspace/table and what table-<uuid> is active?
>
> This is in a 2.2.x environment that has probably churned a bit from 2.1.x

Re: Determining active sstables and table- dir

Posted by kurt greaves <ku...@instaclustr.com>.
In 2.2 it's cf_id from system.schema_columnfamilies. If it's not then
that's a bug. From 2.2 we stopped including table name in the SSTable name,
so whatever directory contains the SSTables is the active one. Conversely,
if you've dropped a table and re-added it, the directory without any
SSTables is the dropped table, and if you had auto_snapshot enabled it will
have a snapshots directory in there with a snapshot at the time of the drop.

On 27 April 2018 at 20:24, Carl Mueller <ca...@smartthings.com>
wrote:

> IN cases where a table was dropped and re-added, there are now two table
> directories with different uuids with sstables.
>
> If you don't have knowledge of which one is active, how do you determine
> which is the active table directory? I have tried cf_id from
> system.schema_columnfamilies and that can work some of the time but have
> seen times cf_id != table-<uuid>
>
> I have also seen situations where sstables that don't have the
> table/columnfamily are in the table dir and are clearly that active
> sstables (they compacted when I did a nodetool compact)
>
> Is there a way to get a running cassandra node's sstables for a given
> keyspace/table and what table-<uuid> is active?
>
> This is in a 2.2.x environment that has probably churned a bit from 2.1.x
>