You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2012/07/02 20:53:16 UTC
svn commit: r1356403 - in /accumulo/branches/1.4: ./ src/ src/core/
src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java
src/server/
Author: ecn
Date: Mon Jul 2 18:53:15 2012
New Revision: 1356403
URL: http://svn.apache.org/viewvc?rev=1356403&view=rev
Log:
ACCUMULO-665: merge to 1.4 branch
Modified:
accumulo/branches/1.4/ (props changed)
accumulo/branches/1.4/src/ (props changed)
accumulo/branches/1.4/src/core/ (props changed)
accumulo/branches/1.4/src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java
accumulo/branches/1.4/src/server/ (props changed)
Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
Merged /accumulo/trunk:r1356400
Merged /accumulo/branches/1.4:r1356400
Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
Merged /accumulo/trunk/src:r1356400
Merged /accumulo/branches/1.4/src:r1356400
Merged /accumulo/trunk:r1356400
Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
Merged /accumulo/trunk/src/core:r1356400
Merged /accumulo/trunk/core:r1356400
Merged /accumulo/branches/1.4/src/core:r1356400
Modified: accumulo/branches/1.4/src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java?rev=1356403&r1=1356402&r2=1356403&view=diff
==============================================================================
--- accumulo/branches/1.4/src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java (original)
+++ accumulo/branches/1.4/src/examples/wikisearch/query/src/main/java/org/apache/accumulo/examples/wikisearch/iterator/AndIterator.java Mon Jul 2 18:53:15 2012
@@ -17,9 +17,11 @@
package org.apache.accumulo.examples.wikisearch.iterator;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
+import org.apache.accumulo.core.data.ArrayByteSequence;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.PartialKey;
@@ -86,7 +88,8 @@ public class AndIterator implements Sort
}
/*
- * | Row | Column Family | Column Qualifier | Value | {RowID} | {dataLocation} | {term}\0{dataType}\0{UID} | Empty
+ * | Row | Column Family | Column Qualifier | Value
+ * | {RowID} | {dataLocation} | {term}\0{dataType}\0{UID} | Empty
*/
protected Text getPartition(Key key) {
return key.getRow();
@@ -778,21 +781,24 @@ public class AndIterator implements Sort
// 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;
+ Text dataLocation = (sources[i].dataLocation == null) ? nullText : sources[i].dataLocation;
+ Collection<ByteSequence> columnFamilies = new ArrayList<ByteSequence>();
+ columnFamilies.add(new ArrayByteSequence(dataLocation.getBytes(), 0, dataLocation.getLength()));
if (range.getStartKey() != null) {
// Build a key with the DocID if one is given
- if (range.getStartKey().getColumnFamily() != null) {
- sourceKey = buildKey(getPartition(range.getStartKey()), (sources[i].dataLocation == null) ? nullText : sources[i].dataLocation,
+ if (range.getStartKey().getColumnFamily() != null) {
+ sourceKey = buildKey(getPartition(range.getStartKey()), dataLocation,
(sources[i].term == null) ? nullText : new Text(sources[i].term + "\0" + range.getStartKey().getColumnFamily()));
} // Build a key with just the term.
else {
- sourceKey = buildKey(getPartition(range.getStartKey()), (sources[i].dataLocation == null) ? nullText : sources[i].dataLocation,
+ sourceKey = buildKey(getPartition(range.getStartKey()), dataLocation,
(sources[i].term == null) ? nullText : sources[i].term);
}
if (!range.isStartKeyInclusive())
sourceKey = sourceKey.followingKey(PartialKey.ROW_COLFAM_COLQUAL);
- sources[i].iter.seek(new Range(sourceKey, true, null, false), seekColumnFamilies, inclusive);
+ sources[i].iter.seek(new Range(sourceKey, true, null, false), columnFamilies, inclusive);
} else {
- sources[i].iter.seek(range, seekColumnFamilies, inclusive);
+ sources[i].iter.seek(range, columnFamilies, inclusive);
}
}
Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
Merged /accumulo/trunk/src/server:r1356400
Merged /accumulo/branches/1.4/src/server:r1356400
Merged /accumulo/trunk/server:r1356400