@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public class MultiRowMutationEndpoint extends org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationService implements RegionCoprocessor
HRegion.mutateRowsWithLocks(Collection, Collection, long, long)
and Coprocessor endpoints.
Defines a protocol to perform multi row transactions.
See MultiRowMutationEndpoint for the implementation.
HRegion.mutateRowsWithLocks(Collection, Collection, long, long)
for details and limitations.
List<Mutation> mutations = ...;
Put p1 = new Put(row1);
Put p2 = new Put(row2);
...
Mutate m1 = ProtobufUtil.toMutate(MutateType.PUT, p1);
Mutate m2 = ProtobufUtil.toMutate(MutateType.PUT, p2);
MutateRowsRequest.Builder mrmBuilder = MutateRowsRequest.newBuilder();
mrmBuilder.addMutationRequest(m1);
mrmBuilder.addMutationRequest(m2);
CoprocessorRpcChannel channel = t.coprocessorService(ROW);
MultiRowMutationService.BlockingInterface service =
MultiRowMutationService.newBlockingStub(channel);
MutateRowsRequest mrm = mrmBuilder.build();
service.mutateRows(null, mrm);
org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationService.BlockingInterface, org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationService.Interface, org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MultiRowMutationService.StubCoprocessor.StatePRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION| 构造器和说明 |
|---|
MultiRowMutationEndpoint() |
| 限定符和类型 | 方法和说明 |
|---|---|
Iterable<com.google.protobuf.Service> |
getServices() |
void |
mutateRows(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MutateRowsRequest request,
com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MutateRowsResponse> done) |
void |
start(CoprocessorEnvironment env)
Stores a reference to the coprocessor environment provided by the
RegionCoprocessorHost from the region where this
coprocessor is loaded. |
void |
stop(CoprocessorEnvironment env) |
callMethod, getDescriptor, getDescriptorForType, getRequestPrototype, getResponsePrototype, newBlockingStub, newReflectiveBlockingService, newReflectiveService, newStubclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBulkLoadObserver, getEndpointObserver, getRegionObserverpublic void mutateRows(com.google.protobuf.RpcController controller,
org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MutateRowsRequest request,
com.google.protobuf.RpcCallback<org.apache.hadoop.hbase.protobuf.generated.MultiRowMutationProtos.MutateRowsResponse> done)
public Iterable<com.google.protobuf.Service> getServices()
getServices 在接口中 Coprocessorpublic void start(CoprocessorEnvironment env) throws IOException
RegionCoprocessorHost from the region where this
coprocessor is loaded. Since this is a coprocessor endpoint, it always expects to be loaded
on a table region, so always expects this to be an instance of
RegionCoprocessorEnvironment.start 在接口中 Coprocessorenv - the environment provided by the coprocessor hostIOException - if the provided environment is not an instance of
RegionCoprocessorEnvironmentpublic void stop(CoprocessorEnvironment env) throws IOException
stop 在接口中 CoprocessorIOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.