mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.0' into cassandra-2.1
This commit is contained in:
commit
2d1e46e40a
|
|
@ -24,22 +24,31 @@ import java.util.concurrent.ExecutionException;
|
|||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.cassandra.config.Schema;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.apache.cassandra.SchemaLoader;
|
||||
import org.apache.cassandra.Util;
|
||||
import org.apache.cassandra.config.Schema;
|
||||
import org.apache.cassandra.db.*;
|
||||
import org.apache.cassandra.io.sstable.SSTableReader;
|
||||
import org.apache.cassandra.io.sstable.SSTableUtils;
|
||||
import org.apache.cassandra.utils.ByteBufferUtil;
|
||||
import org.apache.cassandra.utils.FBUtilities;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class LongCompactionsTest extends SchemaLoader
|
||||
{
|
||||
public static final String KEYSPACE1 = "Keyspace1";
|
||||
|
||||
@Before
|
||||
public void cleanupFiles()
|
||||
{
|
||||
Keyspace keyspace = Keyspace.open(KEYSPACE1);
|
||||
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore("Standard1");
|
||||
cfs.truncateBlocking();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test compaction with a very wide row.
|
||||
*/
|
||||
|
|
@ -99,6 +108,7 @@ public class LongCompactionsTest extends SchemaLoader
|
|||
|
||||
long start = System.nanoTime();
|
||||
final int gcBefore = (int) (System.currentTimeMillis() / 1000) - Schema.instance.getCFMetaData(KEYSPACE1, "Standard1").getGcGraceSeconds();
|
||||
assert store.getDataTracker().markCompacting(sstables): "Cannot markCompacting all sstables";
|
||||
new CompactionTask(store, sstables, gcBefore, false).execute(null);
|
||||
System.out.println(String.format("%s: sstables=%d rowsper=%d colsper=%d: %d ms",
|
||||
this.getClass().getName(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue