hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1126558 - /hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
Date Mon, 23 May 2011 16:00:22 GMT
Author: apurtell
Date: Mon May 23 16:00:21 2011
New Revision: 1126558

URL: http://svn.apache.org/viewvc?rev=1126558&view=rev
Log:
HBASE-3912 [Stargate] Columns not handle by Scan; fix NPE

Modified:
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java?rev=1126558&r1=1126557&r2=1126558&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
Mon May 23 16:00:21 2011
@@ -356,8 +356,12 @@ public class ScannerModel implements Pro
     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());
         }
       }
     }



Mime
View raw message