fix for HER-2035 xml representation of job url can be invalid

This commit is contained in:
Noah Levitt
2013-03-29 12:16:07 -07:00
parent 5fdf5713a2
commit dcbbec4bbb
2 changed files with 15 additions and 4 deletions
@@ -22,6 +22,7 @@ package org.archive.crawler.framework;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeSet;
@@ -259,8 +260,18 @@ public class ToePool extends ThreadGroup implements Reporter {
Map<String,Object> data = new LinkedHashMap<String, Object>();
data.put("toeCount", getToeCount());
data.put("steps", steps.getSortedByCounts());
data.put("processors", processors.getSortedByCounts());
LinkedList<String> unwound = new LinkedList<String>();
for (Entry<?, Long> step: steps.getSortedByCounts()) {
unwound.add(step.getValue() + " " + step.getKey());
}
data.put("steps", unwound);
unwound = new LinkedList<String>();
for (Entry<?, Long> proc: processors.getSortedByCounts()) {
unwound.add(proc.getValue() + " " + proc.getKey());
}
data.put("processors", unwound);
return data;
}
@@ -128,8 +128,8 @@
<#if !job.threadReport??><i>n/a</i>
<#else>
${job.threadReport.toeCount} threads:
<#list job.threadReport.steps as step>${step.value} ${step.key}<#if step_has_next>, </#if></#list>;
<#list job.threadReport.processors as proc>${proc.value} ${proc.key}<#if proc_has_next>, </#if></#list>
<#list job.threadReport.steps as step>${step}<#if step_has_next>, </#if></#list>;
<#list job.threadReport.processors as proc>${proc}<#if proc_has_next>, </#if></#list>
</#if>
</dd>
<dt><a href="report/FrontierSummaryReport">Frontier</a></dt>