public void purgeLogsOlderThan ( final long minTxIdToKeep ) { synchronized ( this ) { // synchronized to prevent findbugs warning about inconsistent // synchronization. This will be JIT-ed out if asserts are // off. assert curSegmentTxId == HdfsConstants . INVALID_TXID || // on format this // is no-op minTxIdToKeep <= curSegmentTxId : "cannot purge logs older than txid " + minTxIdToKeep + " when current segment starts at " + curSegmentTxId ; try { journalSet . purgeLogsOlderThan ( minTxIdToKeep ) ; } catch ( IOException ex ) { // All journals have failed, it will be handled in logSync. } } }
Archive any log files that are older than the given txid .