Issue 328 - don't retry unsuccessful MQL key based reconciliation
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1997 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
1df3348b52
commit
cccfbf9ad8
@ -178,6 +178,7 @@ public class KeyBasedReconConfig extends StrictReconConfig {
|
||||
try {
|
||||
String s = ParsingUtilities.inputStreamToString(is);
|
||||
JSONObject o = ParsingUtilities.evaluateJsonStringToObject(s);
|
||||
if (o.has("result")) {
|
||||
JSONArray results = o.getJSONArray("result");
|
||||
int count = results.length();
|
||||
|
||||
@ -209,6 +210,7 @@ public class KeyBasedReconConfig extends StrictReconConfig {
|
||||
|
||||
keyToRecon.put(key, recon);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
is.close();
|
||||
}
|
||||
@ -216,9 +218,16 @@ public class KeyBasedReconConfig extends StrictReconConfig {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
for (int i = 0; i < jobs.size(); i++) {
|
||||
String key = ((KeyBasedReconJob) jobs.get(i)).key;
|
||||
for (ReconJob job : jobs) {
|
||||
String key = ((KeyBasedReconJob) job).key;
|
||||
Recon recon = keyToRecon.get(key);
|
||||
if (recon == null) { // add a no-match recon if none
|
||||
recon = Recon.makeFreebaseRecon(historyEntryID);
|
||||
recon.service = "mql";
|
||||
recon.judgment = Judgment.None;
|
||||
recon.matchRank = -1;
|
||||
keyToRecon.put(key, recon);
|
||||
}
|
||||
recons.add(recon);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user