public synchronized boolean selectInputStreams ( Collection < EditLogInputStream > streams , long fromTxId , long toAtLeastTxId , int minRedundancy ) throws IOException { // at this point we should not have any non-finalized segments // this function is called at startup, and must be invoked after // recovering all in progress segments if ( journalSet . hasUnfinalizedSegments ( fromTxId ) ) { LOG . fatal ( "All streams should be finalized" ) ; throw new IOException ( "All streams should be finalized at startup" ) ; } // get all finalized streams boolean redundancyViolated = journalSet . selectInputStreams ( streams , fromTxId , false , false , minRedundancy ) ; try { checkForGaps ( streams , fromTxId , toAtLeastTxId , true ) ; } catch ( IOException e ) { closeAllStreams ( streams ) ; throw e ; } return redundancyViolated ; }
Select a list of input streams to load .