hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject hbase git commit: HBASE-13968 Remove deprecated methods from BufferedMutator class.(Ashish Singhi)
Date Mon, 29 Jun 2015 05:31:21 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 7dbb2e697 -> 7b92d8c06


HBASE-13968 Remove deprecated methods from BufferedMutator class.(Ashish Singhi)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7b92d8c0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7b92d8c0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7b92d8c0

Branch: refs/heads/master
Commit: 7b92d8c06a9eced95c4390f0dae02ebb98aa3ef7
Parents: 7dbb2e6
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Mon Jun 29 11:00:54 2015 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Mon Jun 29 11:00:54 2015 +0530

----------------------------------------------------------------------
 .../hadoop/hbase/client/BufferedMutatorImpl.java     | 15 ++++-----------
 .../apache/hadoop/hbase/client/TestAsyncProcess.java |  4 ++--
 2 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7b92d8c0/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
index 2ee00d9..0b222b1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
@@ -23,6 +23,8 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 
+import com.google.common.annotations.VisibleForTesting;
+
 import java.io.IOException;
 import java.io.InterruptedIOException;
 import java.util.LinkedList;
@@ -52,7 +54,8 @@ public class BufferedMutatorImpl implements BufferedMutator {
   protected ClusterConnection connection; // non-final so can be overridden in test
   private final TableName tableName;
   private volatile Configuration conf;
-  private List<Row> writeAsyncBuffer = new LinkedList<>();
+  @VisibleForTesting
+  List<Row> writeAsyncBuffer = new LinkedList<>();
   private long writeBufferSize;
   private final int maxKeyValueSize;
   protected long currentWriteBufferSize = 0;
@@ -245,14 +248,4 @@ public class BufferedMutatorImpl implements BufferedMutator {
   public long getWriteBufferSize() {
     return this.writeBufferSize;
   }
-
-  /**
-   * This is used for legacy purposes only. This should not beÓ
-   * called from production uses.
-   * @deprecated Going away when we drop public support for {@link HTableInterface}.
-Ó   */
-  @Deprecated
-  public List<Row> getWriteBuffer() {
-    return this.writeAsyncBuffer;
-  }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/7b92d8c0/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
index 8340f97..fa3ed32 100644
--- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
+++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java
@@ -729,13 +729,13 @@ public class TestAsyncProcess {
     //  puts, we may raise an exception in the middle of the list. It's then up to the caller
to
     //  manage what was inserted, what was tried but failed, and what was not even tried.
     p = createPut(1, true);
-    Assert.assertEquals(0, mutator.getWriteBuffer().size());
+    Assert.assertEquals(0, mutator.writeAsyncBuffer.size());
     try {
       mutator.mutate(p);
       Assert.fail();
     } catch (RetriesExhaustedException expected) {
     }
-    Assert.assertEquals("the put should not been inserted.", 0, mutator.getWriteBuffer().size());
+    Assert.assertEquals("the put should not been inserted.", 0, mutator.writeAsyncBuffer.size());
   }
 
 


Mime
View raw message