From 15c188ad7a751400b7f3d2d9df9a5cbfbd083ee4 Mon Sep 17 00:00:00 2001 From: David Huynh Date: Tue, 27 Apr 2010 23:17:18 +0000 Subject: [PATCH] Added more metadata into recon objects. Tried to minimize number of unique recon objects created when calling Recon.dup(). git-svn-id: http://google-refine.googlecode.com/svn/trunk@560 7d457c2a-affb-35e4-300a-418c747d4874 --- .../recon/ReconJudgeOneCellCommand.java | 15 +++++ .../gridworks/importers/ExcelImporter.java | 22 +++++-- .../com/metaweb/gridworks/model/Recon.java | 34 ++++++++++ .../model/changes/DataExtensionChange.java | 4 ++ .../model/recon/GuidBasedReconConfig.java | 5 +- .../model/recon/HeuristicReconConfig.java | 6 ++ .../model/recon/IdBasedReconConfig.java | 5 +- .../model/recon/KeyBasedReconConfig.java | 5 +- .../EngineDependentMassCellOperation.java | 6 +- .../ReconDiscardJudgmentsOperation.java | 24 +++++-- .../ReconJudgeSimilarCellsOperation.java | 65 ++++++++++++------- .../ReconMarkNewTopicsOperation.java | 33 +++++++--- .../ReconMatchBestCandidatesOperation.java | 26 ++++++-- .../ReconMatchSpecificTopicOperation.java | 29 +++++++-- .../gridworks/operations/ReconOperation.java | 8 ++- 15 files changed, 229 insertions(+), 58 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/commands/recon/ReconJudgeOneCellCommand.java b/src/main/java/com/metaweb/gridworks/commands/recon/ReconJudgeOneCellCommand.java index 39a21be41..b1e8f8b00 100644 --- a/src/main/java/com/metaweb/gridworks/commands/recon/ReconJudgeOneCellCommand.java +++ b/src/main/java/com/metaweb/gridworks/commands/recon/ReconJudgeOneCellCommand.java @@ -134,17 +134,32 @@ public class ReconJudgeOneCellCommand extends Command { ", containing \"" + cell.value + "\""; String description = null; + + newCell.recon.matchRank = -1; + newCell.recon.judgmentAction = "single"; + newCell.recon.judgmentBatchSize = 1; + if (judgment == Judgment.None) { newCell.recon.judgment = Recon.Judgment.None; newCell.recon.match = null; + description = "Discard recon judgment for " + cellDescription; } else if (judgment == Judgment.New) { newCell.recon.judgment = Recon.Judgment.New; + newCell.recon.match = null; + description = "Mark to create new topic for " + cellDescription; } else { newCell.recon.judgment = Recon.Judgment.Matched; newCell.recon.match = this.match; + for (int m = 0; m < newCell.recon.candidates.size(); m++) { + if (newCell.recon.candidates.get(m).topicGUID.equals(this.match.topicGUID)) { + newCell.recon.matchRank = m; + break; + } + } + description = "Match " + this.match.topicName + " (" + match.topicID + ") to " + cellDescription; diff --git a/src/main/java/com/metaweb/gridworks/importers/ExcelImporter.java b/src/main/java/com/metaweb/gridworks/importers/ExcelImporter.java index 7896288a3..7465b5f4c 100644 --- a/src/main/java/com/metaweb/gridworks/importers/ExcelImporter.java +++ b/src/main/java/com/metaweb/gridworks/importers/ExcelImporter.java @@ -132,6 +132,8 @@ public class ExcelImporter implements Importer { * Now process the data rows */ int rowsWithData = 0; + Map reconMap = new HashMap(); + for (; r <= lastRow; r++) { org.apache.poi.ss.usermodel.Row row = sheet.getRow(r); if (row == null) { @@ -206,10 +208,22 @@ public class ExcelImporter implements Importer { id = id.substring(0, h); } - recon = new Recon(); - recon.judgment = Judgment.Matched; - recon.match = new ReconCandidate(id, "", value.toString(), new String[0], 100); - recon.addCandidate(recon.match); + if (reconMap.containsKey(id)) { + recon = reconMap.get(id); + recon.judgmentBatchSize++; + } else { + recon = new Recon(); + recon.service = "import"; + recon.match = new ReconCandidate(id, "", value.toString(), new String[0], 100); + recon.matchRank = 0; + recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; + recon.judgmentBatchSize = 1; + recon.addCandidate(recon.match); + + reconMap.put(id, recon); + } + } } } diff --git a/src/main/java/com/metaweb/gridworks/model/Recon.java b/src/main/java/com/metaweb/gridworks/model/Recon.java index 6cab3541d..064a4a63c 100644 --- a/src/main/java/com/metaweb/gridworks/model/Recon.java +++ b/src/main/java/com/metaweb/gridworks/model/Recon.java @@ -60,9 +60,16 @@ public class Recon implements HasFields, Jsonizable { final public long id; public Object[] features = new Object[Feature_max]; + public String service = "unknown"; public List candidates; + public Judgment judgment = Judgment.None; + public String judgmentAction = "unknown"; + public long judgmentHistoryEntry = -1; + public int judgmentBatchSize = 0; + public ReconCandidate match = null; + public int matchRank = -1; public Recon() { id = System.currentTimeMillis() * 1000000 + Math.round(Math.random() * 1000000); @@ -81,8 +88,16 @@ public class Recon implements HasFields, Jsonizable { r.candidates = new ArrayList(candidates); } + r.service = service; + r.judgment = judgment; + + r.judgmentAction = judgmentAction; + r.judgmentHistoryEntry = judgmentHistoryEntry; + r.judgmentBatchSize = judgmentBatchSize; + r.match = match; + r.matchRank = matchRank; return r; } @@ -190,6 +205,15 @@ public class Recon implements HasFields, Jsonizable { writer.value(o); } writer.endArray(); + + writer.key("service"); writer.value(service); + writer.key("judgmentAction"); writer.value(judgmentAction); + writer.key("judgmentHistoryEntry"); writer.value(judgmentHistoryEntry); + writer.key("judgmentBatchSize"); writer.value(judgmentBatchSize); + + if (match != null) { + writer.key("matchRank"); writer.value(matchRank); + } } writer.endObject(); @@ -268,6 +292,16 @@ public class Recon implements HasFields, Jsonizable { recon.addCandidate(ReconCandidate.loadStreaming(jp)); } } + } else if ("service".equals(fieldName)) { + recon.service = jp.getText(); + } else if ("judgmentAction".equals(fieldName)) { + recon.judgmentAction = jp.getText(); + } else if ("judgmentHistoryEntry".equals(fieldName)) { + recon.judgmentHistoryEntry = jp.getLongValue(); + } else if ("judgmentBatchSize".equals(fieldName)) { + recon.judgmentBatchSize = jp.getIntValue(); + } else if ("matchRank".equals(fieldName)) { + recon.matchRank = jp.getIntValue(); } } diff --git a/src/main/java/com/metaweb/gridworks/model/changes/DataExtensionChange.java b/src/main/java/com/metaweb/gridworks/model/changes/DataExtensionChange.java index 98ee82cbd..86faecc45 100644 --- a/src/main/java/com/metaweb/gridworks/model/changes/DataExtensionChange.java +++ b/src/main/java/com/metaweb/gridworks/model/changes/DataExtensionChange.java @@ -181,8 +181,12 @@ public class DataExtensionChange implements Change { ReconCandidate rc = (ReconCandidate) value; Recon recon = new Recon(); recon.addCandidate(rc); + recon.service = "mql"; recon.match = rc; + recon.matchRank = 0; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; + recon.judgmentBatchSize = 1; cell = new Cell(rc.topicName, recon); } else { diff --git a/src/main/java/com/metaweb/gridworks/model/recon/GuidBasedReconConfig.java b/src/main/java/com/metaweb/gridworks/model/recon/GuidBasedReconConfig.java index 444a76351..3ae7f74c1 100644 --- a/src/main/java/com/metaweb/gridworks/model/recon/GuidBasedReconConfig.java +++ b/src/main/java/com/metaweb/gridworks/model/recon/GuidBasedReconConfig.java @@ -149,8 +149,11 @@ public class GuidBasedReconConfig extends StrictReconConfig { Recon recon = new Recon(); recon.addCandidate(candidate); - recon.match = candidate; + recon.service = "mql"; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; + recon.match = candidate; + recon.matchRank = 0; guidToRecon.put(guid, recon); } diff --git a/src/main/java/com/metaweb/gridworks/model/recon/HeuristicReconConfig.java b/src/main/java/com/metaweb/gridworks/model/recon/HeuristicReconConfig.java index 4b180f8e7..d69be5f7e 100644 --- a/src/main/java/com/metaweb/gridworks/model/recon/HeuristicReconConfig.java +++ b/src/main/java/com/metaweb/gridworks/model/recon/HeuristicReconConfig.java @@ -256,6 +256,7 @@ public class HeuristicReconConfig extends ReconConfig { recon = new Recon(); } + recon.service = "recon"; recons.add(recon); } } finally { @@ -314,7 +315,9 @@ public class HeuristicReconConfig extends ReconConfig { candidate.score / recon.candidates.get(1).score >= 1.5) { recon.match = candidate; + recon.matchRank = 0; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; } } break; @@ -361,6 +364,7 @@ public class HeuristicReconConfig extends ReconConfig { if (recon == null) { recon = new Recon(); } + recon.service = "recon"; recons.add(recon); } @@ -408,7 +412,9 @@ public class HeuristicReconConfig extends ReconConfig { recon.setFeature(Recon.Feature_typeMatch, true); if (autoMatch && result.has("match") && result.getBoolean("match")) { recon.match = candidate; + recon.matchRank = 0; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; } break; } diff --git a/src/main/java/com/metaweb/gridworks/model/recon/IdBasedReconConfig.java b/src/main/java/com/metaweb/gridworks/model/recon/IdBasedReconConfig.java index edca20af2..d40bf56bf 100644 --- a/src/main/java/com/metaweb/gridworks/model/recon/IdBasedReconConfig.java +++ b/src/main/java/com/metaweb/gridworks/model/recon/IdBasedReconConfig.java @@ -153,8 +153,11 @@ public class IdBasedReconConfig extends StrictReconConfig { Recon recon = new Recon(); recon.addCandidate(candidate); - recon.match = candidate; + recon.service = "mql"; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; + recon.match = candidate; + recon.matchRank = 0; idToRecon.put(id, recon); } diff --git a/src/main/java/com/metaweb/gridworks/model/recon/KeyBasedReconConfig.java b/src/main/java/com/metaweb/gridworks/model/recon/KeyBasedReconConfig.java index 2cd44f149..a4bd3084c 100644 --- a/src/main/java/com/metaweb/gridworks/model/recon/KeyBasedReconConfig.java +++ b/src/main/java/com/metaweb/gridworks/model/recon/KeyBasedReconConfig.java @@ -167,8 +167,11 @@ public class KeyBasedReconConfig extends StrictReconConfig { Recon recon = new Recon(); recon.addCandidate(candidate); - recon.match = candidate; + recon.service = "mql"; recon.judgment = Judgment.Matched; + recon.judgmentAction = "auto"; + recon.match = candidate; + recon.matchRank = 0; keyToRecon.put(key, recon); } diff --git a/src/main/java/com/metaweb/gridworks/operations/EngineDependentMassCellOperation.java b/src/main/java/com/metaweb/gridworks/operations/EngineDependentMassCellOperation.java index d0ea68cee..b94291b36 100644 --- a/src/main/java/com/metaweb/gridworks/operations/EngineDependentMassCellOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/EngineDependentMassCellOperation.java @@ -37,7 +37,11 @@ abstract public class EngineDependentMassCellOperation extends EngineDependentOp List cellChanges = new ArrayList(project.rows.size()); FilteredRows filteredRows = engine.getAllFilteredRows(false); - filteredRows.accept(project, createRowVisitor(project, cellChanges)); + try { + filteredRows.accept(project, createRowVisitor(project, cellChanges)); + } catch (Exception e) { + e.printStackTrace(); + } String description = createDescription(column, cellChanges); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconDiscardJudgmentsOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconDiscardJudgmentsOperation.java index 861922560..974d8468f 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconDiscardJudgmentsOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconDiscardJudgmentsOperation.java @@ -1,6 +1,8 @@ package com.metaweb.gridworks.operations; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; import org.json.JSONException; @@ -62,6 +64,7 @@ public class ReconDiscardJudgmentsOperation extends EngineDependentMassCellOpera return new RowVisitor() { int cellIndex; List cellChanges; + Map dupReconMap = new HashMap(); public RowVisitor init(int cellIndex, List cellChanges) { this.cellIndex = cellIndex; @@ -72,11 +75,22 @@ public class ReconDiscardJudgmentsOperation extends EngineDependentMassCellOpera public boolean visit(Project project, int rowIndex, Row row, boolean includeContextual, boolean includeDependent) { Cell cell = row.getCell(cellIndex); if (cell != null && cell.recon != null) { - Recon recon = cell.recon.dup(); - recon.judgment = Judgment.None; - recon.match = null; - - Cell newCell = new Cell(cell.value, recon); + Recon newRecon; + if (dupReconMap.containsKey(cell.recon.id)) { + newRecon = dupReconMap.get(cell.recon.id); + newRecon.judgmentBatchSize++; + } else { + newRecon = cell.recon.dup(); + newRecon.match = null; + newRecon.matchRank = -1; + newRecon.judgment = Judgment.None; + newRecon.judgmentAction = "mass"; + newRecon.judgmentBatchSize = 1; + + dupReconMap.put(cell.recon.id, newRecon); + } + + Cell newCell = new Cell(cell.value, newRecon); CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell); cellChanges.add(cellChange); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconJudgeSimilarCellsOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconJudgeSimilarCellsOperation.java index 87b311487..66e94f43e 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconJudgeSimilarCellsOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconJudgeSimilarCellsOperation.java @@ -150,8 +150,9 @@ public class ReconJudgeSimilarCellsOperation extends EngineDependentMassCellOper return new RowVisitor() { int _cellIndex; - List _cellChanges; - Map _sharedRecons = new HashMap(); + List _cellChanges; + Recon _sharedNewRecon = null; + Map _dupReconMap = new HashMap(); public RowVisitor init(int cellIndex, List cellChanges) { _cellIndex = cellIndex; @@ -167,27 +168,47 @@ public class ReconJudgeSimilarCellsOperation extends EngineDependentMassCellOper Recon recon = null; if (_judgment == Judgment.New && _shareNewTopics) { - String s = cell.value.toString(); - if (_sharedRecons.containsKey(s)) { - recon = _sharedRecons.get(s); - } else { - recon = new Recon(); - recon.judgment = Judgment.New; - - _sharedRecons.put(s, recon); - } + if (_sharedNewRecon == null) { + _sharedNewRecon = new Recon(); + _sharedNewRecon.judgment = Judgment.New; + _sharedNewRecon.judgmentBatchSize = 0; + _sharedNewRecon.judgmentAction = "similar"; + } + _sharedNewRecon.judgmentBatchSize++; + + recon = _sharedNewRecon; } else { - recon = cell.recon == null ? new Recon() : cell.recon.dup(); - if (_judgment == Judgment.Matched) { - recon.judgment = Recon.Judgment.Matched; - recon.match = _match; - } else if (_judgment == Judgment.New) { - recon.judgment = Recon.Judgment.New; - recon.match = null; - } else if (_judgment == Judgment.None) { - recon.judgment = Recon.Judgment.None; - recon.match = null; - } + if (_dupReconMap.containsKey(cell.recon.id)) { + recon = _dupReconMap.get(cell.recon.id); + recon.judgmentBatchSize++; + } else { + recon = cell.recon.dup(); + recon.judgmentBatchSize = 1; + recon.matchRank = -1; + recon.judgmentAction = "similar"; + + if (_judgment == Judgment.Matched) { + recon.judgment = Recon.Judgment.Matched; + recon.match = _match; + + if (recon.candidates != null) { + for (int m = 0; m < recon.candidates.size(); m++) { + if (recon.candidates.get(m).topicGUID.equals(_match.topicGUID)) { + recon.matchRank = m; + break; + } + } + } + } else if (_judgment == Judgment.New) { + recon.judgment = Recon.Judgment.New; + recon.match = null; + } else if (_judgment == Judgment.None) { + recon.judgment = Recon.Judgment.None; + recon.match = null; + } + + _dupReconMap.put(cell.recon.id, recon); + } } Cell newCell = new Cell(cell.value, recon); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconMarkNewTopicsOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconMarkNewTopicsOperation.java index 2a636fbe1..cd73db324 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconMarkNewTopicsOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconMarkNewTopicsOperation.java @@ -72,9 +72,10 @@ public class ReconMarkNewTopicsOperation extends EngineDependentMassCellOperatio Column column = project.columnModel.getColumnByName(_columnName); return new RowVisitor() { - int cellIndex; - List cellChanges; - Map _sharedRecons = new HashMap(); + int cellIndex; + List cellChanges; + Map sharedRecons = new HashMap(); + Map dupReconMap = new HashMap(); public RowVisitor init(int cellIndex, List cellChanges) { this.cellIndex = cellIndex; @@ -88,18 +89,32 @@ public class ReconMarkNewTopicsOperation extends EngineDependentMassCellOperatio Recon recon = null; if (_shareNewTopics) { String s = cell.value == null ? "" : cell.value.toString(); - if (_sharedRecons.containsKey(s)) { - recon = _sharedRecons.get(s); + if (sharedRecons.containsKey(s)) { + recon = sharedRecons.get(s); + recon.judgmentBatchSize++; } else { recon = new Recon(); recon.judgment = Judgment.New; + recon.judgmentBatchSize = 1; + recon.judgmentAction = "mass"; - _sharedRecons.put(s, recon); + sharedRecons.put(s, recon); } } else { - recon = cell.recon == null ? new Recon() : cell.recon.dup(); - recon.match = null; - recon.judgment = Judgment.New; + long reconID = cell.recon == null ? 0 : cell.recon.id; + if (dupReconMap.containsKey(reconID)) { + recon = dupReconMap.get(reconID); + recon.judgmentBatchSize++; + } else { + recon = cell.recon == null ? new Recon() : cell.recon.dup(); + recon.match = null; + recon.matchRank = -1; + recon.judgment = Judgment.New; + recon.judgmentBatchSize = 1; + recon.judgmentAction = "mass"; + + dupReconMap.put(reconID, recon); + } } Cell newCell = new Cell(cell.value, recon); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconMatchBestCandidatesOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconMatchBestCandidatesOperation.java index a57604499..c70d97fa3 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconMatchBestCandidatesOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconMatchBestCandidatesOperation.java @@ -1,6 +1,8 @@ package com.metaweb.gridworks.operations; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; import org.json.JSONException; @@ -13,6 +15,7 @@ import com.metaweb.gridworks.model.AbstractOperation; import com.metaweb.gridworks.model.Cell; import com.metaweb.gridworks.model.Column; import com.metaweb.gridworks.model.Project; +import com.metaweb.gridworks.model.Recon; import com.metaweb.gridworks.model.ReconCandidate; import com.metaweb.gridworks.model.Row; import com.metaweb.gridworks.model.Recon.Judgment; @@ -60,8 +63,9 @@ public class ReconMatchBestCandidatesOperation extends EngineDependentMassCellOp Column column = project.columnModel.getColumnByName(_columnName); return new RowVisitor() { - int cellIndex; - List cellChanges; + int cellIndex; + List cellChanges; + Map dupReconMap = new HashMap(); public RowVisitor init(int cellIndex, List cellChanges) { this.cellIndex = cellIndex; @@ -75,12 +79,24 @@ public class ReconMatchBestCandidatesOperation extends EngineDependentMassCellOp if (cell != null && cell.recon != null) { ReconCandidate candidate = cell.recon.getBestCandidate(); if (candidate != null) { + Recon newRecon; + if (dupReconMap.containsKey(cell.recon.id)) { + newRecon = dupReconMap.get(cell.recon.id); + newRecon.judgmentBatchSize++; + } else { + newRecon = cell.recon.dup(); + newRecon.judgmentBatchSize = 1; + newRecon.match = candidate; + newRecon.matchRank = 0; + newRecon.judgment = Judgment.Matched; + newRecon.judgmentAction = "mass"; + + dupReconMap.put(cell.recon.id, newRecon); + } Cell newCell = new Cell( cell.value, - cell.recon.dup() + newRecon ); - newCell.recon.match = candidate; - newCell.recon.judgment = Judgment.Matched; CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell); cellChanges.add(cellChange); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconMatchSpecificTopicOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconMatchSpecificTopicOperation.java index 3aace050b..dc6f81ff6 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconMatchSpecificTopicOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconMatchSpecificTopicOperation.java @@ -1,6 +1,8 @@ package com.metaweb.gridworks.operations; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; import org.json.JSONArray; @@ -96,6 +98,7 @@ public class ReconMatchSpecificTopicOperation extends EngineDependentMassCellOpe return new RowVisitor() { int cellIndex; List cellChanges; + Map dupReconMap = new HashMap(); public RowVisitor init(int cellIndex, List cellChanges) { this.cellIndex = cellIndex; @@ -104,15 +107,29 @@ public class ReconMatchSpecificTopicOperation extends EngineDependentMassCellOpe } public boolean visit(Project project, int rowIndex, Row row, boolean includeContextual, boolean includeDependent) { - if (cellIndex < row.cells.size()) { - Cell cell = row.cells.get(cellIndex); - + Cell cell = row.getCell(cellIndex); + if (cell != null) { + long reconID = cell.recon != null ? cell.recon.id : 0; + + Recon newRecon; + if (dupReconMap.containsKey(reconID)) { + newRecon = dupReconMap.get(reconID); + newRecon.judgmentBatchSize++; + } else { + newRecon = cell.recon != null ? cell.recon.dup() : new Recon(); + newRecon.match = match; + newRecon.matchRank = -1; + newRecon.judgment = Judgment.Matched; + newRecon.judgmentAction = "mass"; + newRecon.judgmentBatchSize = 1; + + dupReconMap.put(reconID, newRecon); + } + Cell newCell = new Cell( cell.value, - cell.recon != null ? cell.recon.dup() : new Recon() + newRecon ); - newCell.recon.match = match; - newCell.recon.judgment = Judgment.Matched; CellChange cellChange = new CellChange(rowIndex, cellIndex, cell, newCell); cellChanges.add(cellChange); diff --git a/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java b/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java index a08dcbffc..fb46bb2f9 100644 --- a/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java +++ b/src/main/java/com/metaweb/gridworks/operations/ReconOperation.java @@ -229,11 +229,13 @@ public class ReconOperation extends EngineDependentOperation { List recons = _reconConfig.batchRecon(jobs); for (int j = i; j < to; j++) { Recon recon = recons.get(j - i); - if (recon == null) { - recon = new Recon(); + List entries = groups.get(j).entries; + + if (recon != null) { + recon.judgmentBatchSize = entries.size(); } - for (ReconEntry entry : groups.get(j).entries) { + for (ReconEntry entry : entries) { Cell oldCell = entry.cell; Cell newCell = new Cell(oldCell.value, recon);