HBASE-11800 Make HTableInterface coprocessorService methods public
This commit is contained in:
parent
a2fc3efebf
commit
db520b94cb
|
@ -462,7 +462,6 @@ public interface HTableInterface extends Closeable {
|
||||||
* @param row The row key used to identify the remote region location
|
* @param row The row key used to identify the remote region location
|
||||||
* @return A CoprocessorRpcChannel instance
|
* @return A CoprocessorRpcChannel instance
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private // TODO add coproc audience level
|
|
||||||
CoprocessorRpcChannel coprocessorService(byte[] row);
|
CoprocessorRpcChannel coprocessorService(byte[] row);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -486,7 +485,6 @@ public interface HTableInterface extends Closeable {
|
||||||
* {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
|
* {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
|
||||||
* @return a map of result values keyed by region name
|
* @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,
|
<T extends Service, R> Map<byte[],R> coprocessorService(final Class<T> service,
|
||||||
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable)
|
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable)
|
||||||
throws ServiceException, Throwable;
|
throws ServiceException, Throwable;
|
||||||
|
@ -518,7 +516,6 @@ public interface HTableInterface extends Closeable {
|
||||||
* @param <R> Return type for the {@code callable} parameter's
|
* @param <R> Return type for the {@code callable} parameter's
|
||||||
* {@link org.apache.hadoop.hbase.client.coprocessor.Batch.Call#call} method
|
* {@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,
|
<T extends Service, R> void coprocessorService(final Class<T> service,
|
||||||
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable,
|
byte[] startKey, byte[] endKey, final Batch.Call<T,R> callable,
|
||||||
final Batch.Callback<R> callback) throws ServiceException, Throwable;
|
final Batch.Callback<R> callback) throws ServiceException, Throwable;
|
||||||
|
@ -622,7 +619,6 @@ public interface HTableInterface extends Closeable {
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
* @return a map of result values keyed by region name
|
* @return a map of result values keyed by region name
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
|
||||||
<R extends Message> Map<byte[], R> batchCoprocessorService(
|
<R extends Message> Map<byte[], R> batchCoprocessorService(
|
||||||
Descriptors.MethodDescriptor methodDescriptor, Message request,
|
Descriptors.MethodDescriptor methodDescriptor, Message request,
|
||||||
byte[] startKey, byte[] endKey, R responsePrototype) throws ServiceException, Throwable;
|
byte[] startKey, byte[] endKey, R responsePrototype) throws ServiceException, Throwable;
|
||||||
|
@ -658,7 +654,6 @@ public interface HTableInterface extends Closeable {
|
||||||
* @throws ServiceException
|
* @throws ServiceException
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
|
||||||
<R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
|
<R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor methodDescriptor,
|
||||||
Message request, byte[] startKey, byte[] endKey, R responsePrototype,
|
Message request, byte[] startKey, byte[] endKey, R responsePrototype,
|
||||||
Batch.Callback<R> callback) throws ServiceException, Throwable;
|
Batch.Callback<R> callback) throws ServiceException, Throwable;
|
||||||
|
|
|
@ -19,16 +19,17 @@
|
||||||
|
|
||||||
package org.apache.hadoop.hbase.client.coprocessor;
|
package org.apache.hadoop.hbase.client.coprocessor;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
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
|
* A collection of interfaces and utilities used for interacting with custom RPC
|
||||||
* interfaces exposed by Coprocessors.
|
* interfaces exposed by Coprocessors.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Public
|
||||||
|
@InterfaceStability.Stable
|
||||||
public abstract class Batch {
|
public abstract class Batch {
|
||||||
/**
|
/**
|
||||||
* Defines a unit of work to be executed.
|
* Defines a unit of work to be executed.
|
||||||
|
@ -37,9 +38,7 @@ public abstract class Batch {
|
||||||
* When used with
|
* When used with
|
||||||
* {@link org.apache.hadoop.hbase.client.HTable#coprocessorService(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call)}
|
* {@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
|
* the implementations {@link Batch.Call#call(Object)} method will be invoked
|
||||||
* with a proxy to the
|
* with a proxy to each region's coprocessor {@link com.google.protobuf.Service} implementation.
|
||||||
* {@link org.apache.hadoop.hbase.coprocessor.CoprocessorService}
|
|
||||||
* sub-type instance.
|
|
||||||
* </p>
|
* </p>
|
||||||
* @see org.apache.hadoop.hbase.client.coprocessor
|
* @see org.apache.hadoop.hbase.client.coprocessor
|
||||||
* @see org.apache.hadoop.hbase.client.HTable#coprocessorService(byte[])
|
* @see org.apache.hadoop.hbase.client.HTable#coprocessorService(byte[])
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
|
|
||||||
package org.apache.hadoop.hbase.ipc;
|
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.BlockingRpcChannel;
|
||||||
import com.google.protobuf.Descriptors;
|
import com.google.protobuf.Descriptors;
|
||||||
import com.google.protobuf.Message;
|
import com.google.protobuf.Message;
|
||||||
|
@ -28,20 +32,22 @@ import com.google.protobuf.Service;
|
||||||
import com.google.protobuf.ServiceException;
|
import com.google.protobuf.ServiceException;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.hadoop.classification.InterfaceAudience;
|
|
||||||
import org.apache.hadoop.hbase.protobuf.ResponseConverter;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class which provides clients with an RPC connection to
|
* 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 {
|
public abstract class CoprocessorRpcChannel implements RpcChannel, BlockingRpcChannel {
|
||||||
private static Log LOG = LogFactory.getLog(CoprocessorRpcChannel.class);
|
private static Log LOG = LogFactory.getLog(CoprocessorRpcChannel.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@InterfaceAudience.Private
|
||||||
public void callMethod(Descriptors.MethodDescriptor method,
|
public void callMethod(Descriptors.MethodDescriptor method,
|
||||||
RpcController controller,
|
RpcController controller,
|
||||||
Message request, Message responsePrototype,
|
Message request, Message responsePrototype,
|
||||||
|
@ -59,6 +65,7 @@ public abstract class CoprocessorRpcChannel implements RpcChannel, BlockingRpcCh
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@InterfaceAudience.Private
|
||||||
public Message callBlockingMethod(Descriptors.MethodDescriptor method,
|
public Message callBlockingMethod(Descriptors.MethodDescriptor method,
|
||||||
RpcController controller,
|
RpcController controller,
|
||||||
Message request, Message responsePrototype)
|
Message request, Message responsePrototype)
|
||||||
|
|
Loading…
Reference in New Issue