hbase-commits mailing list archives

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

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

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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1126528&r1=1126527&r2=1126528&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Mon May 23 15:07:01 2011
@@ -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)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java?rev=1126528&r1=1126527&r2=1126528&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java Mon May
23 15:07:01 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