@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(); }
.compareTo(getPartition(sources[sourceID].iter.getTopKey())); .compareTo(getPartition(sources[sourceID].iter.getTopKey())); currentPartition.set(getPartition(sources[sourceID].iter.getTopKey())); currentDocID.set(emptyByteArray); advancedCursor = true;
@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(); }
.compareTo(getPartition(sources[sourceID].iter.getTopKey())); .compareTo(getPartition(sources[sourceID].iter.getTopKey())); currentPartition.set(getPartition(sources[sourceID].iter.getTopKey())); currentDocID.set(emptyByteArray); advancedCursor = true;