[
https://issues.apache.org/jira/browse/HBASE-15600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15229823#comment-15229823
]
Anoop Sam John commented on HBASE-15600:
----------------------------------------
bq.Similarly we can allow to write mutations from coprocessors to memstore as
well
So u mean write to memstore directly not via the Region -> Store -> Memstore
path. No that is not correct as those data written to memstore will not get
accounted in HRegion. See
bq.private final AtomicLong memstoreSize = new AtomicLong(0);
bq.Or else we should provide the batch mutation API allow write in batch mutate
coprocessors.
Sorry did not get u. Within the CP hook (like preBatchMutate) we can get
reference to Region and can call the batch method on that? So u want that
write should not do row locking? Already the main row is locked by now and
there is no chance another thread locked this corresponding index row. So that
is ok. So abt size checks?
bq.checkResources()
> 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, 0.98.19, 1.1.5, 1.2.2, 1.0.5
>
>
> 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)