فهرست منبع

HADOOP-2296 hbase shell: phantom columns show up from select command

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@599703 13f79535-47bb-0310-9956-ffa450edef68
Michael Stack 17 سال پیش
والد
کامیت
b947dcbbff
2فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 1 0
      src/contrib/hbase/CHANGES.txt
  2. 6 5
      src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java

+ 1 - 0
src/contrib/hbase/CHANGES.txt

@@ -65,6 +65,7 @@ Trunk (unreleased changes)
    HADOOP-1608 Relational Algrebra Operators
                (Edward Yoon via Stack)
    HADOOP-2198 HTable should have method to return table metadata
+   HADOOP-2296 hbase shell: phantom columns show up from select command
 
 
 Release 0.15.1

+ 6 - 5
src/contrib/hbase/src/java/org/apache/hadoop/hbase/HTable.java

@@ -945,16 +945,17 @@ public class HTable implements HConstants {
       }
       return true;
     }
-    
-    /**
-     * {@inheritDoc}
-     */
-    public boolean next(HStoreKey key, SortedMap<Text, byte[]> results) throws IOException {
+
+    public boolean next(HStoreKey key, SortedMap<Text, byte[]> results)
+    throws IOException {
       checkClosed();
       if (this.closed) {
         return false;
       }
       MapWritable values = null;
+      // Clear the results so we don't inherit any values from any previous
+      // calls to next.
+      results.clear();
       do {
         values = this.server.next(this.scannerId);
       } while (values != null && values.size() == 0 && nextScanner());