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 ) ; }
Does a full blocking rebuild of the indexes specified by columns from the sstables . Does nothing if columns is empty .