git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6343 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 031e6eefbd
commit 1171a72006

@ -97,7 +97,6 @@ public class ReferenceOrder {
doms0.put(dom, Integer.valueOf(count.intValue() + 1));
}
}
} catch (InterruptedException e) {}
if (min == null) min = entryMin.clone(); else min.min(entryMin);
if (max == null) max = entryMax.clone(); else max.max(entryMax);
@ -109,10 +108,16 @@ public class ReferenceOrder {
}
if (doms.size() > 0) maxdomcount = doms.getMaxScore();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
decodedEntries.put(WordReferenceVars.poison);
} catch (InterruptedException e) {}
}
}
public BlockingQueue<WordReferenceVars> decoded() {
return this.decodedEntries;

@ -39,6 +39,7 @@ import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import de.anomic.document.Condenser;
import de.anomic.document.Word;
@ -184,7 +185,9 @@ public final class RankingProcess extends Thread {
// apply all constraints
try {
while ((iEntry = decodedEntries.take()) != WordReferenceVars.poison) {
while (true) {
iEntry = decodedEntries.poll(1, TimeUnit.SECONDS);
if (iEntry == null || iEntry == WordReferenceVars.poison) break;
assert (iEntry.metadataHash().length() == index.row().primaryKeyLength);
//if (iEntry.urlHash().length() != index.row().primaryKeyLength) continue;

Loading…
Cancel
Save