Skip to content
Snippets Groups Projects
Commit e81a82d6 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

batch sioze now pulled from config

parent 9d426582
No related branches found
No related tags found
1 merge request!101Significant config and output updates
...@@ -40,9 +40,6 @@ import com.google.common.base.Throwables; ...@@ -40,9 +40,6 @@ import com.google.common.base.Throwables;
*/ */
public class HazardCalc { public class HazardCalc {
// TODO move to config
private static final int FLUSH_LIMIT = 5;
/** /**
* Entry point for a hazard calculation. * Entry point for a hazard calculation.
* *
...@@ -173,7 +170,7 @@ public class HazardCalc { ...@@ -173,7 +170,7 @@ public class HazardCalc {
for (Site site : sites) { for (Site site : sites) {
Hazard result = calc(model, config, site, executor); Hazard result = calc(model, config, site, executor);
results.add(result); results.add(result);
if (results.size() == FLUSH_LIMIT) { if (results.size() == config.outputBatchSize) {
OpenOption[] opts = firstBatch ? WRITE_OPTIONS : APPEND_OPTIONS; OpenOption[] opts = firstBatch ? WRITE_OPTIONS : APPEND_OPTIONS;
firstBatch = false; firstBatch = false;
Results.writeResults(out, results, opts); Results.writeResults(out, results, opts);
......
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