HBASE-3912 [Stargate] Columns not handle by Scan; fix NPE

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1126556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2011-05-23 15:58:55 +00:00
parent 981f414cd3
commit 60d7a81833
1 changed files with 6 additions and 2 deletions

View File

@ -356,8 +356,12 @@ public class ScannerModel implements ProtobufMessageHandler, Serializable {
Map<byte [], NavigableSet<byte []>> families = scan.getFamilyMap();
if (families != null) {
for (Map.Entry<byte [], NavigableSet<byte []>> entry : families.entrySet()) {
for (byte[] qualifier : entry.getValue()) {
model.addColumn(Bytes.add(entry.getKey(), COLUMN_DIVIDER, qualifier));
if (entry.getValue() != null) {
for (byte[] qualifier: entry.getValue()) {
model.addColumn(Bytes.add(entry.getKey(), COLUMN_DIVIDER, qualifier));
}
} else {
model.addColumn(entry.getKey());
}
}
}