You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ga...@apache.org on 2014/08/22 20:07:00 UTC
git commit: HBASE-11800 Make HTableInterface coprocessorService
methods public
Repository: hbase
Updated Branches:
refs/heads/master a2fc3efeb -> db520b94c
HBASE-11800 Make HTableInterface coprocessorService methods public
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/db520b94
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/db520b94
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/db520b94
Branch: refs/heads/master
Commit: db520b94cbf961408e606040763da8b45616c70f
Parents: a2fc3ef
Author: Gary Helmling <ga...@apache.org>
Authored: Fri Aug 22 11:04:28 2014 -0700
Committer: Gary Helmling <ga...@apache.org>
Committed: Fri Aug 22 11:06:08 2014 -0700
----------------------------------------------------------------------
.../apache/hadoop/hbase/client/HTableInterface.java | 5 -----
.../hadoop/hbase/client/coprocessor/Batch.java | 11 +++++------
.../hadoop/hbase/ipc/CoprocessorRpcChannel.java | 15 +++++++++++----
3 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/db520b94/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTableInterface.java
----------------------------------------------------------------------
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 c02fcee..46b13b1 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
@@ -462,7 +462,6 @@ public interface HTableInterface extends Closeable {
* @param row The row key used to identify the remote region location
* @return A CoprocessorRpcChannel instance
*/
- @InterfaceAudience.Private // TODO add coproc audience level
CoprocessorRpcChannel coprocessorService(byte[] row);
/**
@@ -486,7 +485,6 @@ public interface HTableInterface extends Closeable {
* {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
* @return a map of result values keyed by region name
*/
- @InterfaceAudience.Private // TODO add coproc audience level
<T extends Service, R> Map<byte[],R> coprocessorService(final Class<T> service,
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable)
throws ServiceException, Throwable;
@@ -518,7 +516,6 @@ public interface HTableInterface extends Closeable {
* @param <R> Return type for the {@code callable} parameter's
* {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
*/
- @InterfaceAudience.Private // TODO add coproc audience level
<T extends Service, R> void coprocessorService(final Class<T> service,
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable,
final Batch.Callback<R> callback) throws ServiceException, Throwable;
@@ -622,7 +619,6 @@ public interface HTableInterface extends Closeable {
* @throws Throwable
* @return a map of result values keyed by region name
*/
- @InterfaceAudience.Private
<R extends Message> Map<byte[], R> batchCoprocessorService(
Descriptors.MethodDescriptor methodDescriptor, Message request,
byte[] startKey, byte[] endKey, R responsePrototype) throws ServiceException, Throwable;
@@ -658,7 +654,6 @@ public interface HTableInterface extends Closeable {
* @throws ServiceException
* @throws Throwable
*/
- @InterfaceAudience.Private
<R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
Message request, byte[] startKey, byte[] endKey, R responsePrototype,
Batch.Callback<R> callback) throws ServiceException, Throwable;
http://git-wip-us.apache.org/repos/asf/hbase/blob/db520b94/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Batch.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Batch.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Batch.java
index 41d7b65..3b175a8 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Batch.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/coprocessor/Batch.java
@@ -19,16 +19,17 @@
package org.apache.hadoop.hbase.client.coprocessor;
-import java.io.IOException;
-
import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import java.io.IOException;
/**
* A collection of interfaces and utilities used for interacting with custom RPC
* interfaces exposed by Coprocessors.
*/
-@InterfaceAudience.Private
+@InterfaceAudience.Public
+@InterfaceStability.Stable
public abstract class Batch {
/**
* Defines a unit of work to be executed.
@@ -37,9 +38,7 @@ public abstract class Batch {
* When used with
* {@link org.apache.hadoop.hbase.client.HTable#coprocessorService(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call)}
* the implementations {@link Batch.Call#call(Object)} method will be invoked
- * with a proxy to the
- * {@link org.apache.hadoop.hbase.coprocessor.CoprocessorService}
- * sub-type instance.
+ * with a proxy to each region's coprocessor {@link com.google.protobuf.Service} implementation.
* </p>
* @see org.apache.hadoop.hbase.client.coprocessor
* @see org.apache.hadoop.hbase.client.HTable#coprocessorService(byte[])
http://git-wip-us.apache.org/repos/asf/hbase/blob/db520b94/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcChannel.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcChannel.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcChannel.java
index b998d41..0fcbcb1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcChannel.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/CoprocessorRpcChannel.java
@@ -18,6 +18,10 @@
package org.apache.hadoop.hbase.ipc;
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.protobuf.ResponseConverter;
+
import com.google.protobuf.BlockingRpcChannel;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Message;
@@ -28,20 +32,22 @@ import com.google.protobuf.Service;
import com.google.protobuf.ServiceException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.protobuf.ResponseConverter;
import java.io.IOException;
/**
* Base class which provides clients with an RPC connection to
- * call coprocessor endpoint {@link Service}s
+ * call coprocessor endpoint {@link Service}s. Note that clients should not use this class
+ * directly, except through
+ * {@link org.apache.hadoop.hbase.client.HTableInterface#coprocessorService(byte[])}.
*/
-@InterfaceAudience.Private
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
public abstract class CoprocessorRpcChannel implements RpcChannel, BlockingRpcChannel {
private static Log LOG = LogFactory.getLog(CoprocessorRpcChannel.class);
@Override
+ @InterfaceAudience.Private
public void callMethod(Descriptors.MethodDescriptor method,
RpcController controller,
Message request, Message responsePrototype,
@@ -59,6 +65,7 @@ public abstract class CoprocessorRpcChannel implements RpcChannel, BlockingRpcCh
}
@Override
+ @InterfaceAudience.Private
public Message callBlockingMethod(Descriptors.MethodDescriptor method,
RpcController controller,
Message request, Message responsePrototype)