| 81 | |
| 82 | |
| 83 | protected DataByteArray bloomOr(Tuple input) throws IOException { |
| 84 | filter = new BloomFilter(vSize, numHash, hType); |
| 85 | |
| 86 | try { |
| 87 | DataBag values = (DataBag)input.get(0); |
| 88 | for (Iterator<Tuple> it = values.iterator(); it.hasNext();) { |
| 89 | Tuple t = it.next(); |
| 90 | filter.or(bloomIn((DataByteArray)t.get(0))); |
| 91 | } |
| 92 | } catch (ExecException ee) { |
| 93 | throw new IOException(ee); |
| 94 | } |
| 95 | |
| 96 | return bloomOut(); |
| 97 | } |
| 98 | |
| 99 | protected DataByteArray bloomOut() throws IOException { |
| 100 | ByteArrayOutputStream baos = new ByteArrayOutputStream(vSize / 8); |