diff --git a/src/main/java/org/apache/hadoop/hbase/client/Append.java b/src/main/java/org/apache/hadoop/hbase/client/Append.java index 7c352c8d96f..1124fb37b40 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Append.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Append.java @@ -45,8 +45,7 @@ import org.apache.hadoop.io.Writable; */ @InterfaceAudience.Public @InterfaceStability.Stable -public class Append extends Mutation implements Row { - // TODO: refactor to derive from Put? +public class Append extends Mutation { private static final String RETURN_RESULTS = "_rr_"; private static final byte APPEND_VERSION = (byte)1; diff --git a/src/main/java/org/apache/hadoop/hbase/client/Delete.java b/src/main/java/org/apache/hadoop/hbase/client/Delete.java index 66ef14e146b..ead34c37a54 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Delete.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Delete.java @@ -69,7 +69,7 @@ import java.util.Map; @InterfaceAudience.Public @InterfaceStability.Stable public class Delete extends Mutation - implements Writable, Row, Comparable { + implements Writable, Comparable { private static final byte DELETE_VERSION = (byte)3; /** Constructor for Writable. DO NOT USE */ diff --git a/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 8e7d7f7d610..fb201e772da 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -700,7 +700,7 @@ public class HTable implements HTableInterface { * {@inheritDoc} */ @Override - public synchronized void batch(final List actions, final Object[] results) + public synchronized void batch(final List actions, final Object[] results) throws InterruptedException, IOException { connection.processBatch(actions, tableName, pool, results); } @@ -709,7 +709,7 @@ public class HTable implements HTableInterface { * {@inheritDoc} */ @Override - public synchronized Object[] batch(final List actions) throws InterruptedException, IOException { + public synchronized Object[] batch(final List actions) throws InterruptedException, IOException { Object[] results = new Object[actions.size()]; connection.processBatch(actions, tableName, pool, results); return results; diff --git a/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java b/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java index 04150adf7af..6dbcf334255 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java @@ -92,7 +92,7 @@ public interface HTableInterface extends Closeable { * @throws IOException * @since 0.90.0 */ - void batch(final List actions, final Object[] results) throws IOException, InterruptedException; + void batch(final List actions, final Object[] results) throws IOException, InterruptedException; /** * Same as {@link #batch(List, Object[])}, but returns an array of @@ -104,7 +104,7 @@ public interface HTableInterface extends Closeable { * @throws IOException * @since 0.90.0 */ - Object[] batch(final List actions) throws IOException, InterruptedException; + Object[] batch(final List actions) throws IOException, InterruptedException; /** * Extracts certain cells from a given row. diff --git a/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java b/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java index 47381f4a26f..d888af9acc3 100755 --- a/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java @@ -354,13 +354,13 @@ public class HTablePool implements Closeable { } @Override - public void batch(List actions, Object[] results) throws IOException, + public void batch(List actions, Object[] results) throws IOException, InterruptedException { table.batch(actions, results); } @Override - public Object[] batch(List actions) throws IOException, + public Object[] batch(List actions) throws IOException, InterruptedException { return table.batch(actions); } diff --git a/src/main/java/org/apache/hadoop/hbase/client/Mutation.java b/src/main/java/org/apache/hadoop/hbase/client/Mutation.java index 0958a691f9f..eb5c481947d 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Mutation.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Mutation.java @@ -35,7 +35,7 @@ import org.apache.hadoop.hbase.util.Bytes; @InterfaceAudience.Public @InterfaceStability.Evolving -public abstract class Mutation extends OperationWithAttributes { +public abstract class Mutation extends OperationWithAttributes implements Row { // Attribute used in Mutations to indicate the originating cluster. private static final String CLUSTER_ID_ATTR = "_c.id_"; @@ -152,6 +152,7 @@ public abstract class Mutation extends OperationWithAttributes { * Method for retrieving the delete's row * @return row */ + @Override public byte [] getRow() { return this.row; } diff --git a/src/main/java/org/apache/hadoop/hbase/client/Put.java b/src/main/java/org/apache/hadoop/hbase/client/Put.java index 9ff267fedcb..fcbeb954b4d 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Put.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Put.java @@ -48,7 +48,7 @@ import java.util.TreeMap; @InterfaceAudience.Public @InterfaceStability.Stable public class Put extends Mutation - implements HeapSize, Writable, Row, Comparable { + implements HeapSize, Writable, Comparable { private static final byte PUT_VERSION = (byte)2; private static final long OVERHEAD = ClassSize.align( diff --git a/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java b/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java index 18c13c4964f..db60d051008 100644 --- a/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java +++ b/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java @@ -470,13 +470,13 @@ public abstract class CoprocessorHost { } @Override - public void batch(List actions, Object[] results) + public void batch(List actions, Object[] results) throws IOException, InterruptedException { table.batch(actions, results); } @Override - public Object[] batch(List actions) + public Object[] batch(List actions) throws IOException, InterruptedException { return table.batch(actions); } diff --git a/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java b/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java index 56e31e1d3a2..ccfe8781eab 100644 --- a/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java +++ b/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java @@ -616,12 +616,12 @@ public class RemoteHTable implements HTableInterface { } @Override - public void batch(List actions, Object[] results) throws IOException { + public void batch(List actions, Object[] results) throws IOException { throw new IOException("batch not supported"); } @Override - public Object[] batch(List actions) throws IOException { + public Object[] batch(List actions) throws IOException { throw new IOException("batch not supported"); }