src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
/**
     * 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 columns the list of columns to index
     * @throws IOException 
     */
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 columns the list of columns to index
@throws IOException
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 columns the list of columns to index @throws IOException
public void maybeBuildSecondaryIndexes(Collection<SSTableReader> sstables, SortedSet<ByteBuffer> columns) throws IOException
    {
        if (columns.isEmpty())
            return;
        logger.info(String.format("Submitting index build of %s for data in %s",
                                  baseCfs.metadata.comparator.getString(columns), StringUtils.join(sstables, ", ")));
        SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs, columns, new ReducingKeyIterator(sstables));
        Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
        try
        {
            future.get();
            flushIndexesBlocking();
        }
        catch (InterruptedException e)
        {
            throw new AssertionError(e);
        }
        catch (ExecutionException e)
        {
            throw new RuntimeException(e);
        }
        logger.info("Index build of " + baseCfs.metadata.comparator.getString(columns) + " complete");
    }
public void maybeBuildSecondaryIndexes ( Collection < SSTableReader > sstables , SortedSet < ByteBuffer > columns ) throws IOException { if ( columns . isEmpty ( ) ) return ; logger . info ( String . format ( "Submitting index build of %s for data in %s" , baseCfs . metadata . comparator . getString ( columns ) , StringUtils . join ( sstables , ", " ) ) ) ; SecondaryIndexBuilder builder = new SecondaryIndexBuilder ( baseCfs , columns , new ReducingKeyIterator ( sstables ) ) ; Future < ? > future = CompactionManager . instance . submitIndexBuild ( builder ) ; try { future . get ( ) ; flushIndexesBlocking ( ) ; } catch ( InterruptedException e ) { throw new AssertionError ( e ) ; } catch ( ExecutionException e ) { throw new RuntimeException ( e ) ; } logger . info ( "Index build of " + baseCfs . metadata . comparator . getString ( columns ) + " complete" ) ; }
Does a full, blocking rebuild of the indexes specified by columns from the sstables.
Does a full blocking rebuild of the indexes specified by columns from the sstables .