[ https://issues.apache.org/jira/browse/HBASE-10169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13878309#comment-13878309 ]
Jingcheng Du commented on HBASE-10169: -------------------------------------- Thanks [~apurtell]. 1. I plan to add new APIs to HTableInterface to execute the batch coprocessor service. {code} public <R extends Message> Map<byte[], R> batchCoprocessorService( Descriptors.ServiceDescriptor serviceDescriptor, String method, Message message, byte[] startKey, byte[] endKey, R responsePrototype) public <R extends Message> void batchCoprocessorService( final Descriptors.ServiceDescriptor serviceDescriptor, final String method, final Message message, byte[] startKey, byte[] endKey, final Callback<R> callback, final R responsePrototype){code} 2. Add new request/reponse for the batch call. {code} message CoprocessorServiceResponseOrException { required RegionSpecifier region = 1; optional CoprocessorServiceResponse response = 2; // If the operation failed, this exception is set optional NameBytesPair exception = 3; } message MultiCoprocessorServiceRequest { repeated CoprocessorServiceRequest request = 1; } message MultiCoprocessorServiceResponse { repeated CoprocessorServiceResponseOrException resultOrException = 1; }{code} 3. Add a new rpc to the service ClientService. {code} rpc ExecMultiService(MultiCoprocessorServiceRequest) returns(MultiCoprocessorServiceResponse);{code} > Batch coprocessor > ----------------- > > Key: HBASE-10169 > URL: https://issues.apache.org/jira/browse/HBASE-10169 > Project: HBase > Issue Type: Sub-task > Components: Coprocessors > Affects Versions: 0.99.0 > Reporter: Jingcheng Du > Assignee: Jingcheng Du > Attachments: Batch Coprocessor Design Document.docx, HBASE-10169.patch > > > This is designed to improve the coprocessor invocation in the client side. > Currently the coprocessor invocation is to send a call to each region. If > there’s one region server, and 100 regions are located in this server, each > coprocessor invocation will send 100 calls, each call uses a single thread in > the client side. The threads will run out soon when the coprocessor > invocations are heavy. > In this design, all the calls to the same region server will be grouped into > one in a single coprocessor invocation. This call will be spread into each > region in the server side, and the results will be merged ahead in the server > side before being returned to the client. -- This message was sent by Atlassian JIRA (v6.1.5#6160)