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

This commit is contained in:
anoopsjohn 2015-06-29 11:00:54 +05:30
parent 7dbb2e6977
commit 7b92d8c06a
2 changed files with 6 additions and 13 deletions

View File

@ -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;
}
}

View File

@ -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());
}