private void setEndFileMarkerFile ( String fileName ) { int fileIndex = parseFileIndex ( fileName ) ; if ( endFileNumber == - 1 ) { // First time finding the end-marker file. endFileNumber = fileIndex ; logger . atInfo ( ) . log ( "Found end-marker file '%s' with index %s" , fileName , endFileNumber ) ; // Sanity-check known filenames against the endFileNumber. for ( String knownFile : knownFileSet ) { int knownFileIndex = parseFileIndex ( knownFile ) ; Preconditions . checkState ( knownFileIndex <= endFileNumber , "Found known file '%s' with index %s, which isn't less than or " + "equal to than endFileNumber %s!" , knownFile , knownFileIndex , endFileNumber ) ; } } else { // If we found it before, make sure the file we're looking at has the same index. Preconditions . checkState ( fileIndex == endFileNumber , "Found new end-marker file '%s' with index %s but already have endFileNumber %s!" , fileName , fileIndex , endFileNumber ) ; } }
Record a specific file as being the 0 - record end of stream marker .