Author: stack
Date: Mon Sep 19 21:37:02 2011
New Revision: 1172851

URL: http://svn.apache.org/viewvc?rev=1172851&view=rev
Log:
HBASE-4444 Miscommit of HBASE-4195 to 0.90 branch (committed as though it were 
hbase-4423)

Modified:
    
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
    
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java

Modified: 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1172851&r1=1172850&r2=1172851&view=diff
==============================================================================
--- 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
 (original)
+++ 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
 Mon Sep 19 21:37:02 2011
@@ -715,22 +715,6 @@ public class HBaseAdmin implements Abort
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be modified
-   * @param descriptor new column descriptor to use
-   * @throws IOException if a remote or network exception occurs
-   * @deprecated The <code>columnName</code> is redundant. Use {@link 
#addColumn(String, HColumnDescriptor)}
-   */
-  public void modifyColumn(final String tableName, final String columnName,
-      HColumnDescriptor descriptor)
-  throws IOException {
-    modifyColumn(tableName,  descriptor);
-  }
-
-  /**
-   * Modify an existing column family on a table.
-   * Asynchronous operation.
-   *
-   * @param tableName name of table
    * @param descriptor new column descriptor to use
    * @throws IOException if a remote or network exception occurs
    */
@@ -744,22 +728,6 @@ public class HBaseAdmin implements Abort
    * Asynchronous operation.
    *
    * @param tableName name of table
-   * @param columnName name of column to be modified
-   * @param descriptor new column descriptor to use
-   * @throws IOException if a remote or network exception occurs
-   * @deprecated The <code>columnName</code> is redundant. Use {@link 
#modifyColumn(byte[], HColumnDescriptor)}
-   */
-  public void modifyColumn(final byte [] tableName, final byte [] columnName,
-    HColumnDescriptor descriptor)
-  throws IOException {
-    modifyColumn(tableName, descriptor);
-  }
-
-  /**
-   * Modify an existing column family on a table.
-   * Asynchronous operation.
-   *
-   * @param tableName name of table
    * @param descriptor new column descriptor to use
    * @throws IOException if a remote or network exception occurs
    */

Modified: 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java?rev=1172851&r1=1172850&r2=1172851&view=diff
==============================================================================
--- 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
 (original)
+++ 
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
 Mon Sep 19 21:37:02 2011
@@ -646,15 +646,12 @@ public class MemStore implements HeapSiz
     private KeyValue snapshotNextRow = null;
 
     // iterator based scanning.
-    private Iterator<KeyValue> kvsetIt;
-    private Iterator<KeyValue> snapshotIt;
+    Iterator<KeyValue> kvsetIt;
+    Iterator<KeyValue> snapshotIt;
 
     // number of iterations in this reseek operation
-    private int numIterReseek;
-
-    // the pre-calculated KeyValue to be returned by peek() or next()
-    private KeyValue theNext;
-
+    int numIterReseek;
+    
     /*
     Some notes...
 
@@ -724,14 +721,14 @@ public class MemStore implements HeapSiz
       //    snapshot.size() + " threadread = " + readPoint);
 
 
-      theNext = getLowest();
+      KeyValue lowest = getLowest();
 
-      // has data := (theNext != null)
-      return theNext != null;
+      // has data := (lowest != null)
+      return lowest != null;
     }
 
     @Override
-    public synchronized boolean reseek(KeyValue key) {
+    public boolean reseek(KeyValue key) {
       numIterReseek = reseekNumKeys;
       while (kvsetNextRow != null &&
           comparator.compare(kvsetNextRow, key) < 0) {
@@ -754,21 +751,17 @@ public class MemStore implements HeapSiz
           return seek(key);
         }
       }
-
-      theNext = getLowest();
-
-      // has data := (theNext != null)
-      return theNext != null;
+      return (kvsetNextRow != null || snapshotNextRow != null);
     }
 
-    @Override
     public synchronized KeyValue peek() {
       //DebugPrint.println(" MS@" + hashCode() + " peek = " + getLowest());
-      return theNext;
+      return getLowest();
     }
 
-    @Override
+
     public synchronized KeyValue next() {
+      KeyValue theNext = getLowest();
 
       if (theNext == null) {
           return null;
@@ -784,13 +777,7 @@ public class MemStore implements HeapSiz
       //long readpoint = ReadWriteConsistencyControl.getThreadReadPoint();
       //DebugPrint.println(" MS@" + hashCode() + " next: " + theNext + " 
next_next: " +
       //    getLowest() + " threadpoint=" + readpoint);
-
-
-      final KeyValue ret = theNext;
-
-      theNext = getLowest();
-
-      return ret;
+      return theNext;
     }
 
     protected KeyValue getLowest() {
@@ -814,7 +801,6 @@ public class MemStore implements HeapSiz
       return (first != null ? first : second);
     }
 
-    @Override
     public synchronized void close() {
       this.kvsetNextRow = null;
       this.snapshotNextRow = null;


Reply via email to