[ 
https://issues.apache.org/jira/browse/HBASE-11766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14099511#comment-14099511
 ] 

Jeffrey Zhong commented on HBASE-11766:
---------------------------------------

In class CoprocessorHConnection, we have following: 
{quote}
  public <R> void processBatchCallback(List<? extends Row> list, TableName 
tableName,
      ExecutorService pool, Object[] results, Callback<R> callback) throws 
IOException,
      InterruptedException {
    delegate.processBatchCallback(list, tableName, pool, results, callback);
  }
{quote}
The delegate is HConnectionImplementation object. Inside processBatchCallback 
shown below, we call createAsyncProcess using "this", which is a 
HConnectionImplementation instance, so the overridden getClient() behavior of 
CoprocessorHConnection is lost because the "this" is the delegate instance in 
type of HConnectionImplementation.

{code}
    protected <R> AsyncProcess createAsyncProcess(TableName tableName, 
ExecutorService pool,
           AsyncProcess.AsyncProcessCallback<R> callback, Configuration conf) {
      return new AsyncProcess<R>(this, tableName, pool, callback, conf,
          RpcRetryingCallerFactory.instantiate(conf), 
RpcControllerFactory.instantiate(conf));
    }
{code}

We should extend CoprocessorHConnection from class HConnectionImplementation.

> Backdoor CoprocessorHConnection is no longer being used for local writes
> ------------------------------------------------------------------------
>
>                 Key: HBASE-11766
>                 URL: https://issues.apache.org/jira/browse/HBASE-11766
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.4
>            Reporter: James Taylor
>              Labels: Phoenix
>
> There's a backdoor CoprocessorHConnection used to ensure that a batched 
> mutation does not go over the wire and back, but executes immediately 
> locally. This is leveraged by Phoenix during secondary index maintenance (for 
> an ~20% perf improvement). It looks to me like it's no longer used, as the 
> following function is never invoked:
>   public 
> org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface
>       getClient(ServerName serverName) throws IOException {
> It'd be good if feasible to add an HBase unit test to prevent further 
> regressions. For more info, see PHOENIX-1166.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to