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

Thomas D'Silva commented on HBASE-22148:
----------------------------------------

In Phoenix index maintenance for tables that are mutable (where rows can be 
updated after they are created) is handled in a coprocessor.  The coprocessor 
sets the timestamp of the data table mutations in order to prevent index from 
getting out of sync with the data table under high concurrency. The particular 
case we are trying to handle is when the same Put occurs with the same time 
stamp from different clients. In order to handle this we set the timestamp of 
the data table mutation on the server side after the row has been locked 
(PHOENIX-4089 has more details).  

We use the {{preBatchMutate}}  hook to set the timestamp of the data table 
mutations using {{CellUtil.setTimestamp}}
(see 
https://github.com/apache/phoenix/blob/507e6b5a0f0c94cd85ed359cd04d92e849743a31/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java#L441)

> Provide an alternative to CellUtil.setTimestamp 
> ------------------------------------------------
>
>                 Key: HBASE-22148
>                 URL: https://issues.apache.org/jira/browse/HBASE-22148
>             Project: HBase
>          Issue Type: New Feature
>          Components: API, Coprocessors
>    Affects Versions: 3.0.0
>            Reporter: Thomas D'Silva
>            Priority: Blocker
>              Labels: phoenix
>             Fix For: 3.0.0
>
>
> {{CellUtil.setTimestamp}} has been deprecated in 2.0 and is marked for 
> removal in 3.0. Phoenix currently uses this api to set the timestamp of cells 
> in its indexing coprocessor for tables that have mutable indexes. We can't 
> use the CellBuilder api since this involves creating a copy of the cell which 
> will be expensive. 
> FYI @stack



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to