diff --git a/common/core/src/main/java/zingg/common/core/block/Block.java b/common/core/src/main/java/zingg/common/core/block/Block.java index dab51da2..8d8f6ffc 100644 --- a/common/core/src/main/java/zingg/common/core/block/Block.java +++ b/common/core/src/main/java/zingg/common/core/block/Block.java @@ -3,6 +3,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -206,6 +207,16 @@ public void estimateElimCount(Canopy c, long elimCount) { } + /** + * */ + protected List getFieldsOfInterest(List fieldsOfInterest){ + //shallow clone is fine + List shuffled = new ArrayList(fieldsOfInterest); + Collections.shuffle(shuffled); + LOG.warn("shuffling"); + return shuffled; + } + /** * Holy Grail of Standalone * @@ -228,7 +239,7 @@ public Tree> getBlockingTree(Tree> tree, Canopyparent, } if (size > maxSize && node.getDupeN() != null && node.getDupeN().size() > 0) { LOG.debug("Size is bigger "); - Canopybest = getBestNode(tree, parent, node, fieldsOfInterest); + Canopybest = getBestNode(tree, parent, node, getFieldsOfInterest(fieldsOfInterest)); if (best != null) { LOG.warn(" HashFunction is " + best + " and node is " + node); if (LOG.isDebugEnabled()) {