本文整理汇总了Java中org.apache.cassandra.db.columniterator.IdentityQueryFilter类的典型用法代码示例。如果您正苦于以下问题:Java IdentityQueryFilter类的具体用法?Java IdentityQueryFilter怎么用?Java IdentityQueryFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IdentityQueryFilter类属于org.apache.cassandra.db.columniterator包,在下文中一共展示了IdentityQueryFilter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws ExecutionException, InterruptedException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs, false);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:22,代码来源:ScrubTest.java
示例2: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws ExecutionException, InterruptedException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs, false);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:22,代码来源:ScrubTest.java
示例3: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:21,代码来源:ScrubTest.java
示例4: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:21,代码来源:ScrubTest.java
示例5: getPaged
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
private static Set<DecoratedKey> getPaged(ColumnFamilyStore store, int pageSize, IndexExpression... expressions)
{
List<Row> currentPage;
Set<DecoratedKey> uniqueKeys = new TreeSet<>();
DecoratedKey lastKey = null;
do
{
currentPage = getIndexed(store, new IdentityQueryFilter(), lastKey, pageSize, expressions);
if (currentPage == null)
break;
for (Row row : currentPage)
uniqueKeys.add(row.key);
Row lastRow = Iterators.getLast(currentPage.iterator(), null);
if (lastRow == null)
break;
lastKey = lastRow.key;
}
while (currentPage.size() == pageSize);
return uniqueKeys;
}
开发者ID:xedin,项目名称:sasi,代码行数:27,代码来源:SSTableAttachedSecondaryIndexTest.java
示例6: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(1, rows.size());
}
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:21,代码来源:ScrubTest.java
示例7: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(10, rows.size());
}
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:21,代码来源:ScrubTest.java
示例8: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(1, rows.size());
}
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:22,代码来源:ScrubTest.java
示例9: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Keyspace keyspace = Keyspace.open(KEYSPACE);
ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(Util.range("", ""), null, new IdentityQueryFilter(), 1000);
assertEquals(10, rows.size());
}
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:22,代码来源:ScrubTest.java
示例10: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(1, rows.size());
}
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:22,代码来源:ScrubTest.java
示例11: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
cfs.clearUnsafe();
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter(), null);
assertEquals(10, rows.size());
}
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:22,代码来源:ScrubTest.java
示例12: testScrubOneRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubOneRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 1);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(1, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(1, rows.size());
}
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:21,代码来源:ScrubTest.java
示例13: testScrubMultiRow
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testScrubMultiRow() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
CompactionManager.instance.disableAutoCompaction();
Table table = Table.open(TABLE);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, 10);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(10, rows.size());
CompactionManager.instance.performScrub(cfs);
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(10, rows.size());
}
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:21,代码来源:ScrubTest.java
示例14: testCleanup
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
@Test
public void testCleanup() throws IOException, ExecutionException, InterruptedException, ConfigurationException
{
StorageService.instance.initServer();
Table table = Table.open(TABLE1);
ColumnFamilyStore cfs = table.getColumnFamilyStore(CF2);
List<Row> rows;
// insert data and verify we get it back w/ range query
fillCF(cfs, LOOPS);
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(LOOPS, rows.size());
// with one token in the ring, owned by the local node, cleanup should be a no-op
CompactionManager.instance.performCleanup(cfs, new NodeId.OneShotRenewer());
// check data is still there
rows = cfs.getRangeSlice(null, Util.range("", ""), 1000, new IdentityQueryFilter());
assertEquals(LOOPS, rows.size());
}
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:23,代码来源:CleanupTest.java
示例15: pageRowLocally
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
/**
* Convenience method to (locally) page an internal row.
* Used to 2ndary index a wide row without dying.
*/
public static Iterator<ColumnFamily> pageRowLocally(final ColumnFamilyStore cfs, ByteBuffer key, final int pageSize)
{
SliceFromReadCommand command = new SliceFromReadCommand(cfs.metadata.ksName, key, cfs.name, System.currentTimeMillis(), new IdentityQueryFilter());
final SliceQueryPager pager = new SliceQueryPager(command, null, null, true);
return new Iterator<ColumnFamily>()
{
// We don't use AbstractIterator because we don't want hasNext() to do an actual query
public boolean hasNext()
{
return !pager.isExhausted();
}
public ColumnFamily next()
{
try
{
List<Row> rows = pager.fetchPage(pageSize);
ColumnFamily cf = rows.isEmpty() ? null : rows.get(0).cf;
return cf == null ? ArrayBackedSortedColumns.factory.create(cfs.metadata) : cf;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:38,代码来源:QueryPagers.java
示例16: serializedSchema
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
/**
* @param schemaCfName The name of the ColumnFamily responsible for part of the schema (keyspace, ColumnFamily, columns)
* @return low-level schema representation (each row represents individual Keyspace or ColumnFamily)
*/
public static List<Row> serializedSchema(String schemaCfName)
{
Token minToken = StorageService.getPartitioner().getMinimumToken();
return schemaCFS(schemaCfName).getRangeSlice(new Range<RowPosition>(minToken.minKeyBound(), minToken.maxKeyBound()),
null,
new IdentityQueryFilter(),
Integer.MAX_VALUE,
System.currentTimeMillis());
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:SystemKeyspace.java
示例17: getRangeSlice
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
public static List<Row> getRangeSlice(ColumnFamilyStore cfs, ByteBuffer superColumn)
{
IDiskAtomFilter filter = superColumn == null
? new IdentityQueryFilter()
: new SliceQueryFilter(SuperColumns.startOf(superColumn), SuperColumns.endOf(superColumn), false, Integer.MAX_VALUE);
Token min = StorageService.getPartitioner().getMinimumToken();
return cfs.getRangeSlice(new Bounds<Token>(min, min).toRowBounds(), null, filter, 10000);
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:10,代码来源:Util.java
示例18: pageRowLocally
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
/**
* Convenience method to (locally) page an internal row.
* Used to 2ndary index a wide row without dying.
*/
public static Iterator<ColumnFamily> pageRowLocally(final ColumnFamilyStore cfs, ByteBuffer key, final int pageSize)
{
SliceFromReadCommand command = new SliceFromReadCommand(cfs.metadata.ksName, key, cfs.name, System.currentTimeMillis(), new IdentityQueryFilter());
final SliceQueryPager pager = new SliceQueryPager(command, null, true);
return new Iterator<ColumnFamily>()
{
// We don't use AbstractIterator because we don't want hasNext() to do an actual query
public boolean hasNext()
{
return !pager.isExhausted();
}
public ColumnFamily next()
{
try
{
List<Row> rows = pager.fetchPage(pageSize);
ColumnFamily cf = rows.isEmpty() ? null : rows.get(0).cf;
return cf == null ? EmptyColumns.factory.create(cfs.metadata) : cf;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:38,代码来源:QueryPagers.java
示例19: merge
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
public static void merge(final ColumnFamily returnCF, List<CloseableIterator<Column>> data, final SecondaryIndexManager.Updater indexer)
{
IDiskAtomFilter filter = new IdentityQueryFilter();
Comparator<Column> fcomp = filter.getColumnComparator(returnCF.getComparator());
MergeIterator.Reducer<Column, Column> reducer = new MergeIterator.Reducer<Column, Column>()
{
ColumnFamily container = returnCF.cloneMeShallow();
public void reduce(Column column)
{
container.addColumn(column);
// skip the index-update checks if there is no indexing needed since they are a bit expensive
if (indexer == SecondaryIndexManager.nullUpdater)
return;
// notify the index that the column has been overwritten if the value being reduced has been
// superceded by another directly, or indirectly by a range tombstone
if ((!column.isMarkedForDelete(System.currentTimeMillis()) && !container.getColumn(column.name()).equals(column))
|| returnCF.deletionInfo().isDeleted(column.name(), CompactionManager.NO_GC))
{
indexer.remove(column);
}
}
protected Column getReduced()
{
Column c = container.iterator().next();
container.clear();
return c;
}
};
Iterator<Column> reduced = MergeIterator.get(data, fcomp, reducer);
filter.collectReducedColumns(returnCF, reduced, CompactionManager.NO_GC, System.currentTimeMillis());
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:38,代码来源:PrecompactedRow.java
示例20: getRangeSlice
import org.apache.cassandra.db.columniterator.IdentityQueryFilter; //导入依赖的package包/类
public static List<Row> getRangeSlice(ColumnFamilyStore cfs, ByteBuffer superColumn) throws IOException, ExecutionException, InterruptedException
{
IDiskAtomFilter filter = superColumn == null
? new IdentityQueryFilter()
: new SliceQueryFilter(SuperColumns.startOf(superColumn), SuperColumns.endOf(superColumn), false, Integer.MAX_VALUE);
Token min = StorageService.getPartitioner().getMinimumToken();
return cfs.getRangeSlice(new Bounds<Token>(min, min).toRowBounds(), null, filter, 10000);
}
开发者ID:pgaref,项目名称:ACaZoo,代码行数:10,代码来源:Util.java
注:本文中的org.apache.cassandra.db.columniterator.IdentityQueryFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论