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:
parent
2ed476e3dd
commit
981f414cd3
|
@ -109,6 +109,7 @@ Release 0.91.0 - Unreleased
|
||||||
HBASE-3898 TestSplitTransactionOnCluster broke in TRUNK
|
HBASE-3898 TestSplitTransactionOnCluster broke in TRUNK
|
||||||
HBASE-3826 Minor compaction needs to check if still over
|
HBASE-3826 Minor compaction needs to check if still over
|
||||||
compactionThreshold after compacting (Nicolas Spiegelberg)
|
compactionThreshold after compacting (Nicolas Spiegelberg)
|
||||||
|
HBASE-3912 [Stargate] Columns not handle by Scan
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||||
|
|
|
@ -26,6 +26,8 @@ import java.io.StringReader;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.NavigableSet;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
@ -341,6 +343,8 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
|
||||||
return writer.toString();
|
return writer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final byte[] COLUMN_DIVIDER = Bytes.toBytes(":");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param scan the scan specification
|
* @param scan the scan specification
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -349,10 +353,12 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
|
||||||
ScannerModel model = new ScannerModel();
|
ScannerModel model = new ScannerModel();
|
||||||
model.setStartRow(scan.getStartRow());
|
model.setStartRow(scan.getStartRow());
|
||||||
model.setEndRow(scan.getStopRow());
|
model.setEndRow(scan.getStopRow());
|
||||||
byte[][] families = scan.getFamilies();
|
Map<byte [], NavigableSet<byte []>> families = scan.getFamilyMap();
|
||||||
if (families != null) {
|
if (families != null) {
|
||||||
for (byte[] column: families) {
|
for (Map.Entry<byte [], NavigableSet<byte []>> entry : families.entrySet()) {
|
||||||
model.addColumn(column);
|
for (byte[] qualifier : entry.getValue()) {
|
||||||
|
model.addColumn(Bytes.add(entry.getKey(), COLUMN_DIVIDER, qualifier));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model.setStartTime(scan.getTimeRange().getMin());
|
model.setStartTime(scan.getTimeRange().getMin());
|
||||||
|
|
Loading…
Reference in New Issue