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

ramkrishna.s.vasudevan commented on HBASE-9249:
-----------------------------------------------

The idea of making it puts is very good.  Atleast when we see with 
HIndex(Ideally this is what would be needed) +1 on that.
{code}
+
+  @Override
+  public void preSplitBeforePONR(ObserverContext<RegionCoprocessorEnvironment> 
ctx,
+      byte[] splitKey, List<Put> putsFromCoprocessor) throws IOException {
+  }

{code}
One comment is we will make the List<Put> to List<Mutations>.  This would mean 
that later if we have some other use case with these split logic we could add 
any operation on that and that would be atomic too.
                
> Add cp hook before setting PONR in split
> ----------------------------------------
>
>                 Key: HBASE-9249
>                 URL: https://issues.apache.org/jira/browse/HBASE-9249
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>         Attachments: HBASE-9249.patch, HBASE-9249_v2.patch, 
> HBASE-9249_v3.patch, HBASE-9249_v4.patch, HBASE-9249_v5.patch, 
> HBASE-9249_v6.patch
>
>
> This hook helps to perform split on user region and corresponding index 
> region such that both will be split or none.
> With this hook split for user and index region as follows
> user region
> ===========
> 1) Create splitting znode for user region split
> 2) Close parent user region
> 3) split user region storefiles
> 4) instantiate child regions of user region
> Through the new hook we can call index region transitions as below
> index region
> ===========
> 5) Create splitting znode for index region split
> 6) Close parent index region
> 7) Split storefiles of index region
> 8) instantiate child regions of the index region
> If any failures in 5,6,7,8 rollback the steps and return null, on null return 
> throw exception to rollback for 1,2,3,4
> 9) set PONR
> 10) do batch put of offline and split entries for user and index regions
> index region
> ============
> 11) open daughers of index regions and transition znode to split. This step 
> we will do through preSplitAfterPONR hook. Opening index regions before 
> opening user regions helps to avoid put failures if there is colocation 
> mismatch(this can happen if user regions opening completed but index regions 
> opening in progress)
> user region
> ===========
> 12) open daughers of user regions and transition znode to split.
> Even if region server crashes also at the end both user and index regions 
> will be split or none

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to