private void commitProgress ( FileOffset position ) { if ( position == null ) { return ; } if ( lock != null && canCommitNow ( ) ) { try { String pos = position . toString ( ) ; lock . heartbeat ( pos ) ; LOG . debug ( "{} Committed progress. {}" , spoutId , pos ) ; acksSinceLastCommit = 0 ; commitTimeElapsed . set ( false ) ; setupCommitElapseTimer ( ) ; } catch ( IOException e ) { LOG . error ( "Unable to commit progress Will retry later. Spout ID = " + spoutId , e ) ; } } }
will commit progress into lock file if commit threshold is reached