protected void advanceToIntersection() throws IOException { boolean cursorChanged = true; while (cursorChanged) { // seek all of the sources to at least the highest seen column qualifier in the current row cursorChanged = false; for (int i = 0; i < sourcesCount; i++) { if (currentPartition == null) { topKey = null; return; } if (seekOneSource(i)) { cursorChanged = true; break; } } } topKey = buildKey(currentPartition, nullText, currentDocID); }
@Override public void seek(Range range, Collection<ByteSequence> seekColumnFamilies, boolean inclusive) throws IOException { overallRange = new Range(range); currentPartition = new Text(); currentDocID.set(emptyByteArray); // seek each of the sources to the right column family within the row given by key for (int i = 0; i < sourcesCount; i++) { Key sourceKey; if (range.getStartKey() != null) { if (range.getStartKey().getColumnQualifier() != null) { sourceKey = buildKey(getPartition(range.getStartKey()), sources[i].term, range.getStartKey().getColumnQualifier()); } else { sourceKey = buildKey(getPartition(range.getStartKey()), sources[i].term); } // Seek only to the term for this source as a column family sources[i].iter.seek(new Range(sourceKey, true, null, false), sources[i].seekColfams, true); } else { // Seek only to the term for this source as a column family sources[i].iter.seek(range, sources[i].seekColfams, true); } } advanceToIntersection(); }
Key seekKey = buildKey(currentPartition, sources[sourceID].term); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true);
protected void advanceToIntersection() throws IOException { boolean cursorChanged = true; while (cursorChanged) { // seek all of the sources to at least the highest seen column qualifier in the current row cursorChanged = false; for (int i = 0; i < sourcesCount; i++) { if (currentPartition == null) { topKey = null; return; } if (seekOneSource(i)) { cursorChanged = true; break; } } } topKey = buildKey(currentPartition, nullText, currentDocID); }
@Override public void seek(Range range, Collection<ByteSequence> seekColumnFamilies, boolean inclusive) throws IOException { overallRange = new Range(range); currentPartition = new Text(); currentDocID.set(emptyByteArray); // seek each of the sources to the right column family within the row given by key for (int i = 0; i < sourcesCount; i++) { Key sourceKey; if (range.getStartKey() != null) { if (range.getStartKey().getColumnQualifier() != null) { sourceKey = buildKey(getPartition(range.getStartKey()), sources[i].term, range.getStartKey().getColumnQualifier()); } else { sourceKey = buildKey(getPartition(range.getStartKey()), sources[i].term); } // Seek only to the term for this source as a column family sources[i].iter.seek(new Range(sourceKey, true, null, false), sources[i].seekColfams, true); } else { // Seek only to the term for this source as a column family sources[i].iter.seek(range, sources[i].seekColfams, true); } } advanceToIntersection(); }
Key seekKey = buildKey(currentPartition, sources[sourceID].term); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true); Key seekKey = buildKey(currentPartition, sources[sourceID].term, currentDocID); sources[sourceID].iter.seek(new Range(seekKey, true, null, false), sources[sourceID].seekColfams, true);