hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1126529 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
Date Mon, 23 May 2011 15:07:08 GMT
Author: apurtell
Date: Mon May 23 15:07:07 2011
New Revision: 1126529

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

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

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1126529&r1=1126528&r2=1126529&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Mon May 23 15:07:07 2011
@@ -14,6 +14,7 @@ Release 0.90.4 - Unreleased
                cause data-loss (Jieshan Bean)
    HBASE-3905  HBaseAdmin.createTableAsync() should check for invalid split
                keys. (Ted Yu)
+   HBASE-3912  [Stargate] Columns not handle by Scan
 
   IMPROVEMENT
    HBASE-3882  hbase-config.sh needs to be updated so it can auto-detects the

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=1126529&r1=1126528&r2=1126529&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 15:07:07 2011
@@ -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 Pro
     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 Pro
     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());



Mime
View raw message