Index: src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java (revision 1172692) +++ src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java (working copy) @@ -646,15 +646,12 @@ private KeyValue snapshotNextRow = null; // iterator based scanning. - private Iterator kvsetIt; - private Iterator snapshotIt; + Iterator kvsetIt; + Iterator 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 @@ // 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 @@ 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 @@ //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 @@ return (first != null ? first : second); } - @Override public synchronized void close() { this.kvsetNextRow = null; this.snapshotNextRow = null; Index: src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (revision 1172692) +++ src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (working copy) @@ -715,25 +715,9 @@ * 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 columnName 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 - */ public void modifyColumn(final String tableName, HColumnDescriptor descriptor) throws IOException { modifyColumn(Bytes.toBytes(tableName), descriptor); @@ -744,25 +728,9 @@ * 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 columnName 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 - */ public void modifyColumn(final byte [] tableName, HColumnDescriptor descriptor) throws IOException { try {