[
https://issues.apache.org/jira/browse/PHOENIX-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097829#comment-14097829
]
Jeffrey Zhong commented on PHOENIX-1166:
----------------------------------------
{quote}
Which uses a CoprocessorHConnection to get a 'backdoor' connection to the
region if it is present on the local server. It avoids
serializing/deserializing the data and writes directly to the region
{quote}
The 'backdoor' connection only saves the IPC layer overhead such as serializing
data into underlying socket & deserializing data from socket. But there are
other steps when we call HTable.batch() such as following:
1) locating region where the traffic are going to be sent
2) PBed data to prepare the RPC call multi
3) Call client(BlockingInterface) to conduct the RPC call (this is where our
backdoor connection in place & save remote RPC)
4) Deserialize the PBed data from multi call
5) Internally call HRegion.batchMutate()
Therefore, current patch can save some work.
While 1) the current patch misses built-in retry logic from HTable which should
be added into and 2) doesn't handle the case when getIndexRegion returns null.
> Avoid HTable creation in coprocessors to write into local index table
> ---------------------------------------------------------------------
>
> Key: PHOENIX-1166
> URL: https://issues.apache.org/jira/browse/PHOENIX-1166
> Project: Phoenix
> Issue Type: Bug
> Reporter: rajeshbabu
> Assignee: rajeshbabu
> Fix For: 5.0.0, 4.1
>
> Attachments: PHOENIX-1166.patch
>
>
> Since data table regions and local index regions colocated, we can get index
> region directly from RS online regions and write to it.
--
This message was sent by Atlassian JIRA
(v6.2#6252)