当前位置: 首页>>代码示例>>Java>>正文


Java ReducingKeyIterator类代码示例

本文整理汇总了Java中org.apache.cassandra.io.sstable.ReducingKeyIterator的典型用法代码示例。如果您正苦于以下问题:Java ReducingKeyIterator类的具体用法?Java ReducingKeyIterator怎么用?Java ReducingKeyIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ReducingKeyIterator类属于org.apache.cassandra.io.sstable包,在下文中一共展示了ReducingKeyIterator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildIndexBlocking

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
/**
 * Builds the index using the data in the underlying CFS
 * Blocks till it's complete
 */
protected void buildIndexBlocking()
{
    logger.info(String.format("Submitting index build of %s for data in %s",
            getIndexName(), StringUtils.join(baseCfs.getSSTables(), ", ")));

    try (Refs<SSTableReader> sstables = baseCfs.selectAndReference(ColumnFamilyStore.CANONICAL_SSTABLES).refs)
    {
        SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
                                                                  Collections.singleton(getIndexName()),
                                                                  new ReducingKeyIterator(sstables));
        Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
        FBUtilities.waitOnFuture(future);
        forceBlockingFlush();
        setIndexBuilt();
    }
    logger.info("Index build of {} complete", getIndexName());
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:22,代码来源:SecondaryIndex.java

示例2: maybeBuildSecondaryIndexes

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
/**
 * Does a full, blocking rebuild of the indexes specified by columns from the sstables.
 * Does nothing if columns is empty.
 *
 * Caller must acquire and release references to the sstables used here.
 *
 * @param sstables the data to build from
 * @param idxNames the list of columns to index, ordered by comparator
 */
public void maybeBuildSecondaryIndexes(Collection<SSTableReader> sstables, Set<String> idxNames)
{
    if (idxNames.isEmpty())
        return;

    logger.info(String.format("Submitting index build of %s for data in %s",
                              idxNames, StringUtils.join(sstables, ", ")));

    SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs, idxNames, new ReducingKeyIterator(sstables));
    Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
    FBUtilities.waitOnFuture(future);

    flushIndexesBlocking();

    logger.info("Index build of {} complete", idxNames);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:26,代码来源:SecondaryIndexManager.java

示例3: buildIndexBlocking

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
/**
 * Builds the index using the data in the underlying CFS
 * Blocks till it's complete
 */
protected void buildIndexBlocking()
{
    logger.info(String.format("Submitting index build of %s for data in %s",
            getIndexName(), StringUtils.join(baseCfs.getSSTables(), ", ")));

    Collection<SSTableReader> sstables = baseCfs.markCurrentSSTablesReferenced();
    SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
                                                              Collections.singleton(getIndexName()),
                                                              new ReducingKeyIterator(sstables));
    Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
    FBUtilities.waitOnFuture(future);
    forceBlockingFlush();

    setIndexBuilt();
    logger.info("Index build of {} complete", getIndexName());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:21,代码来源:SecondaryIndex.java

示例4: buildIndexesBlocking

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
private void buildIndexesBlocking(Collection<SSTableReader> sstables, Set<Index> indexes)
{
    if (indexes.isEmpty())
        return;

    logger.info("Submitting index build of {} for data in {}",
                indexes.stream().map(i -> i.getIndexMetadata().name).collect(Collectors.joining(",")),
                sstables.stream().map(SSTableReader::toString).collect(Collectors.joining(",")));

    SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
                                                              indexes,
                                                              new ReducingKeyIterator(sstables));
    Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
    FBUtilities.waitOnFuture(future);

    flushIndexesBlocking(indexes);
    logger.info("Index build of {} complete",
                indexes.stream().map(i -> i.getIndexMetadata().name).collect(Collectors.joining(",")));
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:20,代码来源:SecondaryIndexManager.java

示例5: buildIndexBlocking

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
/**
 * Builds the index using the data in the underlying CFS
 * Blocks till it's complete
 */
protected void buildIndexBlocking()
{
    logger.info(String.format("Submitting index build of %s for data in %s",
            getIndexName(), StringUtils.join(baseCfs.getSSTables(), ", ")));

    Collection<SSTableReader> sstables = baseCfs.markCurrentSSTablesReferenced();
    try
    {
        SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
                                                                  Collections.singleton(getIndexName()),
                                                                  new ReducingKeyIterator(sstables));
        Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
        FBUtilities.waitOnFuture(future);
        forceBlockingFlush();
        setIndexBuilt();
    }
    finally
    {
        SSTableReader.releaseReferences(sstables);
    }
    logger.info("Index build of {} complete", getIndexName());
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:27,代码来源:SecondaryIndex.java

示例6: SecondaryIndexBuilder

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
public SecondaryIndexBuilder(ColumnFamilyStore cfs, Set<Index> indexers, ReducingKeyIterator iter)
{
    this.cfs = cfs;
    this.indexers = indexers;
    this.iter = iter;
    this.compactionId = UUIDGen.getTimeUUID();
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:8,代码来源:SecondaryIndexBuilder.java

示例7: buildBlocking

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
private void buildBlocking()
{
    baseCfs.forceBlockingFlush();

    try (ColumnFamilyStore.RefViewFragment viewFragment = baseCfs.selectAndReference(View.selectFunction(SSTableSet.CANONICAL));
         Refs<SSTableReader> sstables = viewFragment.refs)
    {
        if (sstables.isEmpty())
        {
            logger.info("No SSTable data for {}.{} to build index {} from, marking empty index as built",
                        baseCfs.metadata.ksName,
                        baseCfs.metadata.cfName,
                        metadata.name);
            baseCfs.indexManager.markIndexBuilt(metadata.name);
            return;
        }

        logger.info("Submitting index build of {} for data in {}",
                    metadata.name,
                    getSSTableNames(sstables));

        SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
                                                                  Collections.singleton(this),
                                                                  new ReducingKeyIterator(sstables));
        Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
        FBUtilities.waitOnFuture(future);
        indexCfs.forceBlockingFlush();
        baseCfs.indexManager.markIndexBuilt(metadata.name);
    }
    logger.info("Index build of {} complete", metadata.name);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:32,代码来源:CassandraIndex.java

示例8: SecondaryIndexBuilder

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
public SecondaryIndexBuilder(ColumnFamilyStore cfs, Set<String> idxNames, ReducingKeyIterator iter)
{
    this.cfs = cfs;
    this.idxNames = idxNames;
    this.iter = iter;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:7,代码来源:SecondaryIndexBuilder.java

示例9: createIndexBuilder

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
public IndexBuilder createIndexBuilder(ColumnFamilyStore cfs, SortedSet<ByteBuffer> columns, ReducingKeyIterator iter)
{
    return new IndexBuilder(cfs, columns, iter);
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:5,代码来源:Table.java

示例10: IndexBuilder

import org.apache.cassandra.io.sstable.ReducingKeyIterator; //导入依赖的package包/类
public IndexBuilder(ColumnFamilyStore cfs, SortedSet<ByteBuffer> columns, ReducingKeyIterator iter)
{
    this.cfs = cfs;
    this.columns = columns;
    this.iter = iter;
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:7,代码来源:Table.java


注:本文中的org.apache.cassandra.io.sstable.ReducingKeyIterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。