HBASE-11800 Make HTableInterface coprocessorService methods public

This commit is contained in:
Gary Helmling 2014-08-22 11:04:28 -07:00
parent a2fc3efebf
commit db520b94cb
3 changed files with 16 additions and 15 deletions

View File

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

View File

@ -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[])

View File

@ -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)