hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshbabu Chintaguntla (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 Thu, 07 Apr 2016 18:36:25 GMT

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

Rajeshbabu Chintaguntla commented on HBASE-15600:
-------------------------------------------------

[~anoop.hbase]
bq. What if it can not acquire the lock within the time out also? It will return null then.
How to handle?
We are throwing IOException when we are not able to acquire lock. I think that's ok.

bq. When diff Mutations in a batch contain different Durability, we will go with highest priority
for that batch. In this evaluation these Mutations from CP also to be considered
I can add this.

bq. Why set to 0th item? What will happen to some thing already added to this index. By the
time code is here, it might be already in place.
Adding all the mutations to first WALEdit from coprocessors because we are not sure how many
mutations are there and how to adjust them to all the wal edits from coprocessors. We are
just adding the cells to waledit so even there are some cells earlier nothing going to happen
to them.
{noformat}
  /**
   * @param index
   * @return Gets the walEdit for the operation(Mutation) at the specified position.
   */
  public WALEdit getWalEdit(int index) {
    return this.walEditsFromCoprocessors[getAbsoluteIndex(index)];
  }
{noformat}
{noformat}
        	WALEdit walEditForCpOperations= miniBatchOp.getWalEdit(0);
        	if(walEditForCpOperations == null) walEditForCpOperations = new WALEdit();
                ....
                    	  for(Cell cell : cells) {
                		  walEditForCpOperations.add(cell);
                	  }
{noformat}


> 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
>
>         Attachments: HBASE-15600.patch, HBASE-15600_v1.patch, HBASE-15600_v2.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