try {
// the following call does not throw an exception if the file/dir does not exist
fs.deleteRecursively(new Path(destPath));
DFSLoggerInputStreams inputStreams = DfsLogger.readHeaderAndReturnStream(fs, srcPath, conf);
this.input = inputStreams.getOriginalInput();
this.decryptingInput = inputStreams.getDecryptingInputStream();
final long bufferSize = conf.getMemoryInBytes(Property.TSERV_SORT_BUFFER_SIZE);
Thread.currentThread().setName("Sorting " + name + " for recovery");
while (true) {
final ArrayList<Pair<LogFileKey,LogFileValue>> buffer = new ArrayList<Pair<LogFileKey,LogFileValue>>();