hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r811221 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
Date Fri, 04 Sep 2009 05:01:53 GMT
Author: stack
Date: Fri Sep  4 05:01:53 2009
New Revision: 811221

URL: http://svn.apache.org/viewvc?rev=811221&view=rev
Log:
HBASE-1779 ThriftServer logged error if getVer() result is empty

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=811221&r1=811220&r2=811221&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Fri Sep  4 05:01:53 2009
@@ -341,6 +341,7 @@
    HBASE-1804  Puts are permitted (and stored) when including an appended colon
    HBASE-1715  Compaction failure in ScanWildcardColumnTracker.checkColumn
    HBASE-1790  filters are not working correctly (HBASE-1710 HBASE-1807 too)
+   HBASE-1779  ThriftServer logged error if getVer() result is empty
 
   IMPROVEMENTS
    HBASE-1089  Add count of regions on filesystem to master UI; add percentage

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=811221&r1=811220&r2=811221&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Fri
Sep  4 05:01:53 2009
@@ -278,9 +278,11 @@
         get.setMaxVersions(numVersions);
         Result result = table.get(get);
         List<Cell> cells = new ArrayList<Cell>();
-        for(KeyValue kv : result.sorted()) {
-          cells.add(new Cell(kv.getValue(), kv.getTimestamp()));
-        }
+	if ( ! result.isEmpty() ) {
+	    for(KeyValue kv : result.sorted()) {
+		cells.add(new Cell(kv.getValue(), kv.getTimestamp()));
+	    }
+	}
         return ThriftUtilities.cellFromHBase(cells.toArray(new Cell[0]));
       } catch (IOException e) {
         throw new IOError(e.getMessage());
@@ -304,12 +306,14 @@
         get.setTimeRange(Long.MIN_VALUE, timestamp);
         get.setMaxVersions(numVersions);
         Result result = table.get(get);
-        List<Cell> cells = new ArrayList<Cell>();
-        KeyValue [] kvs = result.sorted();
-        if (kvs != null) {
-          for(KeyValue kv : kvs) {
-            cells.add(new Cell(kv.getValue(), kv.getTimestamp()));
-          }
+	List<Cell> cells = new ArrayList<Cell>();
+	if ( ! result.isEmpty() ) {
+	    KeyValue [] kvs = result.sorted();
+	    if (kvs != null) {
+		for(KeyValue kv : kvs) {
+		    cells.add(new Cell(kv.getValue(), kv.getTimestamp()));
+		}
+	    }
         }
         return ThriftUtilities.cellFromHBase(cells.toArray(new Cell[0]));
       } catch (IOException e) {



Mime
View raw message