From c8664861b7c3744bb29925646d1bc61862d1aaaf Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Mon, 7 Dec 2009 22:50:31 +0000 Subject: [PATCH] minor CFS cleanup. patch by Stu Hood; reviewed by jbellis for CASSANDRA-520 git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@888169 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/cassandra/db/ColumnFamilyStore.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index f3251390ff..b60bf97416 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -593,8 +593,7 @@ public final class ColumnFamilyStore implements ColumnFamilyStoreMBean * onMemtableFlush() need not be invoked. * * param @ filename - filename just flushed to disk - * param @ bf - bloom filter which indicates the keys that are in this file. - */ + */ public void addSSTable(SSTableReader sstable) { ssTables_.add(sstable); @@ -802,6 +801,11 @@ public final class ColumnFamilyStore implements ColumnFamilyStoreMBean { throw new UnsupportedOperationException("disk full"); } + if (target != null) + { + // compacting for streaming: send to subdirectory + compactionFileLocation = compactionFileLocation + File.separator + DatabaseDescriptor.STREAMING_SUBDIR; + } List results = new ArrayList(); long startTime = System.currentTimeMillis(); @@ -829,10 +833,6 @@ public final class ColumnFamilyStore implements ColumnFamilyStoreMBean { if (writer == null) { - if (target != null) - { - compactionFileLocation = compactionFileLocation + File.separator + DatabaseDescriptor.STREAMING_SUBDIR; - } FileUtils.createDirectory(compactionFileLocation); String newFilename = new File(compactionFileLocation, getTempSSTableFileName()).getAbsolutePath(); writer = new SSTableWriter(newFilename, expectedBloomFilterSize, StorageService.getPartitioner());