You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Jeffrey Zhong (JIRA)" <ji...@apache.org> on 2014/08/15 00:43:19 UTC

[jira] [Comment Edited] (PHOENIX-1166) Avoid HTable creation in coprocessors to write into local index table

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

Jeffrey Zhong edited comment on PHOENIX-1166 at 8/14/14 10:42 PM:
------------------------------------------------------------------

{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 is useful and cut 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.





was (Author: jeffreyz):
{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)