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 ( ) ) ; }
Builds the index using the data in the underlying CFS Blocks till it s complete