本文整理汇总了Java中org.apache.cassandra.db.ColumnFamilyStore.getUnrepairedSSTables方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnFamilyStore.getUnrepairedSSTables方法的具体用法?Java ColumnFamilyStore.getUnrepairedSSTables怎么用?Java ColumnFamilyStore.getUnrepairedSSTables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.db.ColumnFamilyStore
的用法示例。
在下文中一共展示了ColumnFamilyStore.getUnrepairedSSTables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldSkipAntiCompactionForNonIntersectingRange
import org.apache.cassandra.db.ColumnFamilyStore; //导入方法依赖的package包/类
@Test
public void shouldSkipAntiCompactionForNonIntersectingRange() throws InterruptedException, ExecutionException, IOException
{
ColumnFamilyStore store = prepareColumnFamilyStore();
Collection<SSTableReader> sstables = store.getUnrepairedSSTables();
assertEquals(store.getSSTables().size(), sstables.size());
Range<Token> range = new Range<Token>(new BytesToken("-10".getBytes()), new BytesToken("-1".getBytes()));
List<Range<Token>> ranges = Arrays.asList(range);
Refs<SSTableReader> refs = Refs.tryRef(sstables);
if (refs == null)
throw new IllegalStateException();
CompactionManager.instance.performAnticompaction(store, ranges, refs, 1);
assertThat(store.getSSTables().size(), is(1));
assertThat(Iterables.get(store.getSSTables(), 0).isRepaired(), is(false));
assertThat(Iterables.get(store.getSSTables(), 0).selfRef().globalCount(), is(1));
assertThat(store.getDataTracker().getCompacting().size(), is(0));
}
示例2: shouldMutateRepairedAt
import org.apache.cassandra.db.ColumnFamilyStore; //导入方法依赖的package包/类
@Test
public void shouldMutateRepairedAt() throws InterruptedException, ExecutionException, IOException
{
ColumnFamilyStore store = prepareColumnFamilyStore();
Collection<SSTableReader> sstables = store.getUnrepairedSSTables();
assertEquals(store.getSSTables().size(), sstables.size());
Range<Token> range = new Range<Token>(new BytesToken("0".getBytes()), new BytesToken("9999".getBytes()));
List<Range<Token>> ranges = Arrays.asList(range);
CompactionManager.instance.performAnticompaction(store, ranges, Refs.tryRef(sstables), 1);
assertThat(store.getSSTables().size(), is(1));
assertThat(Iterables.get(store.getSSTables(), 0).isRepaired(), is(true));
assertThat(Iterables.get(store.getSSTables(), 0).selfRef().globalCount(), is(1));
assertThat(store.getDataTracker().getCompacting().size(), is(0));
}