diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 2cdcc77246d..a8242d965b6 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -784,18 +784,29 @@ public class HTable implements HTableInterface { } } + /** + * {@inheritDoc} + */ @Override public void batch(final List 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 actions) throws InterruptedException, IOException { return batchCallback(actions, null); } + /** + * {@inheritDoc} + */ @Override public void batchCallback( final List actions, final Object[] results, final Batch.Callback 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 Object[] batchCallback( final List actions, final Batch.Callback callback) throws IOException, diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java index 38ad3992055..ab34d5b64e6 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java @@ -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 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. */ Object[] batchCallback( List actions, Batch.Callback callback diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java index 78180112275..e0e4e32b262 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java @@ -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 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 Object[] batchCallback(List actions, Callback callback) throws IOException, InterruptedException { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java index bcfd3fe47ca..cb6796d4943 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java @@ -523,6 +523,11 @@ public abstract class CoprocessorHost { 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 actions) throws IOException, InterruptedException { @@ -535,6 +540,13 @@ public abstract class CoprocessorHost { 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 Object[] batchCallback(List actions, Batch.Callback callback) throws IOException, InterruptedException {