hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15600) Add provision for adding mutations to memstore or able to write to same region in batchMutate coprocessor hooks
Date Tue, 26 Apr 2016 19:41:13 GMT

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

Enis Soztutar commented on HBASE-15600:
---------------------------------------

Checked the code again. prepareDeleteTimestamps() and prepareDelete() are doing different
things and they are getting called in different times. prepareDelete() is checking the "Delete
row" operation, and fills in families so that it turns into a set of DeleteFamily cells. It
also checks the families in the delete. prepareDeleteTimestamps() is doing an actual Get,
in case delete timestamps are LATEST_TIMESTAMP. 

In the patch, we only call {{prepareDelete()}} for Delete's and we never call {{prepareDeleteTimestamps()}}
for Mutations injected from the coprocessor. This assumes that the timestamps are already
set by the coprocessor (see the javadoc in addOperation()). Similarly for Puts, we do not
call updateCellTimestamps(). Should we also consider calling these for Mutations from CP?
It is not immediately clear for non-Phoenix use cases whether this behavior is needed. 

> Add provision for adding mutations to memstore or able to write to same region in batchMutate
coprocessor hooks
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15600
>                 URL: https://issues.apache.org/jira/browse/HBASE-15600
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>             Fix For: 2.0.0, 1.3.0, 1.4.0, 0.98.20
>
>         Attachments: HBASE-15600.patch, HBASE-15600_v1.patch, HBASE-15600_v2.patch, hbase-15600_v3.patch,
hbase-15600_v4.patch
>
>
> As part of PHOENIX-1734 we need to write the index updates to same region from coprocessors
but writing from batchMutate API is not allowed because of mvcc. 
> Raised PHOENIX-2742 to discuss any alternative way to write to the same region directly
or not but not having any proper solution there.
> Currently we have provision to write wal edits from coprocessors. We can set wal edits
in MiniBatchOperationInProgress.
> {noformat}
>   /**
>    * Sets the walEdit for the operation(Mutation) at the specified position.
>    * @param index
>    * @param walEdit
>    */
>   public void setWalEdit(int index, WALEdit walEdit) {
>     this.walEditsFromCoprocessors[getAbsoluteIndex(index)] = walEdit;
>   }
> {noformat}
> Similarly we can allow to write mutations from coprocessors to memstore as well. Or else
we should provide the batch mutation API allow write in batch mutate coprocessors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message