src/java/org/apache/cassandra/db/compaction/CompactionManager.java
// This is not efficent, do not use in any critical path
This is not efficent, do not use in any critical path
This is not efficent do not use in any critical path
private SSTableReader lookupSSTable(final ColumnFamilyStore cfs, Descriptor descriptor)
    {
        SSTableReader found = null;
        for (SSTableReader sstable : cfs.markCurrentSSTablesReferenced())
        {
            if (sstable.descriptor.toString().endsWith(descriptor.toString()))
                found = sstable;
            else
                sstable.releaseReference();
        }
        return found;
    }
private SSTableReader lookupSSTable ( final ColumnFamilyStore cfs , Descriptor descriptor ) { SSTableReader found = null ; for ( SSTableReader sstable : cfs . markCurrentSSTablesReferenced ( ) ) { if ( sstable . descriptor . toString ( ) . endsWith ( descriptor . toString ( ) ) ) found = sstable ; else sstable . releaseReference ( ) ; } return found ; }
This is not efficent, do not use in any critical path
This is not efficent do not use in any critical path
// .equals() with no other changes won't work because in sstable.descriptor, the directory is an absolute path. // We could construct descriptor with an absolute path too but I haven't found any satisfying way to do that // (DB.getDataFileLocationForTable() may not return the right path if you have multiple volumes). Hence the // endsWith.