Skip to content
Snippets Groups Projects
Commit 76db4957 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

squash! Avoid reprocessing webstats files.

 - Use the default options CREATE, TRUNCATE_EXISTING, and WRITE for
   overwriting the state file rather than just CREATE. The effect was
   that we kept lines from before, which is not a big issue, but also
   not what we wanted.
parent 94b87099
Branches task-32747
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@ import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
......@@ -384,7 +383,7 @@ public class SanitizeWeblogs extends CollecTorMain {
lines.add(String.format("%s,%s", logLineDate, e.getKey().path));
}
}
Files.write(this.processedWebstatsFile, lines, StandardOpenOption.CREATE);
Files.write(this.processedWebstatsFile, lines);
} catch (IOException e) {
log.error("Cannot write state file {}.", this.processedWebstatsFile, e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment