HBASE-8112 Deprecate HTable#batch(final List<? extends Row>)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1552151 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-12-18 23:02:25 +00:00
parent 4ba1942bdc
commit 9101bce0dc
4 changed files with 48 additions and 0 deletions

View File

@ -784,18 +784,29 @@ public class HTable implements HTableInterface {
}
}
/**
* {@inheritDoc}
*/
@Override
public void batch(final List<?extends Row> actions, final Object[] results)
throws InterruptedException, IOException {
batchCallback(actions, results, null);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use {@link #batch(List, Object[])} instead.
*/
@Override
public Object[] batch(final List<? extends Row> actions)
throws InterruptedException, IOException {
return batchCallback(actions, null);
}
/**
* {@inheritDoc}
*/
@Override
public <R> void batchCallback(
final List<? extends Row> actions, final Object[] results, final Batch.Callback<R> callback)
@ -803,6 +814,13 @@ public class HTable implements HTableInterface {
connection.processBatchCallback(actions, tableName, pool, results, callback);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use
* {@link #batchCallback(List, Object[], org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)}
* instead.
*/
@Override
public <R> Object[] batchCallback(
final List<? extends Row> actions, final Batch.Callback<R> callback) throws IOException,

View File

@ -128,6 +128,8 @@ public interface HTableInterface extends Closeable {
* the call for that action failed, even after retries
* @throws IOException
* @since 0.90.0
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use {@link #batch(List, Object[])} instead.
*/
Object[] batch(final List<? extends Row> actions) throws IOException, InterruptedException;
@ -144,6 +146,10 @@ public interface HTableInterface extends Closeable {
/**
* Same as {@link #batch(List)}, but with a callback.
* @since 0.96.0
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use
* {@link #batchCallback(List, Object[], org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)}
* instead.
*/
<R> Object[] batchCallback(
List<? extends Row> actions, Batch.Callback<R> callback

View File

@ -376,6 +376,11 @@ public class HTablePool implements Closeable {
table.batch(actions, results);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use {@link #batch(List, Object[])} instead.
*/
@Override
public Object[] batch(List<? extends Row> actions) throws IOException,
InterruptedException {
@ -547,6 +552,13 @@ public class HTablePool implements Closeable {
table.batchCallback(actions, results, callback);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use
* {@link #batchCallback(List, Object[], org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)}
* instead.
*/
@Override
public <R> Object[] batchCallback(List<? extends Row> actions,
Callback<R> callback) throws IOException, InterruptedException {

View File

@ -523,6 +523,11 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
table.batch(actions, results);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use {@link #batch(List, Object[])} instead.
*/
@Override
public Object[] batch(List<? extends Row> actions)
throws IOException, InterruptedException {
@ -535,6 +540,13 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
table.batchCallback(actions, results, callback);
}
/**
* {@inheritDoc}
* @deprecated If any exception is thrown by one of the actions, there is no way to
* retrieve the partially executed results. Use
* {@link #batchCallback(List, Object[], org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)}
* instead.
*/
@Override
public <R> Object[] batchCallback(List<? extends Row> actions,
Batch.Callback<R> callback) throws IOException, InterruptedException {