HBASE-3912 [Stargate] Columns not handle by Scan

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1126528 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2011-05-23 15:07:01 +00:00
parent 2ed476e3dd
commit 981f414cd3
2 changed files with 10 additions and 3 deletions

View File

@ -109,6 +109,7 @@ Release 0.91.0 - Unreleased
HBASE-3898 TestSplitTransactionOnCluster broke in TRUNK
HBASE-3826 Minor compaction needs to check if still over
compactionThreshold after compacting (Nicolas Spiegelberg)
HBASE-3912 [Stargate] Columns not handle by Scan
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -26,6 +26,8 @@ import java.io.StringReader;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.NavigableSet;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@ -341,6 +343,8 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
return writer.toString();
}
private static final byte[] COLUMN_DIVIDER = Bytes.toBytes(":");
/**
* @param scan the scan specification
* @throws Exception
@ -349,10 +353,12 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
ScannerModel model = new ScannerModel();
model.setStartRow(scan.getStartRow());
model.setEndRow(scan.getStopRow());
byte[][] families = scan.getFamilies();
Map<byte [], NavigableSet<byte []>> families = scan.getFamilyMap();
if (families != null) {
for (byte[] column: families) {
model.addColumn(column);
for (Map.Entry<byte [], NavigableSet<byte []>> entry : families.entrySet()) {
for (byte[] qualifier : entry.getValue()) {
model.addColumn(Bytes.add(entry.getKey(), COLUMN_DIVIDER, qualifier));
}
}
}
model.setStartTime(scan.getTimeRange().getMin());