[
https://issues.apache.org/jira/browse/PHOENIX-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14173450#comment-14173450
]
rajeshbabu edited comment on PHOENIX-1356 at 10/16/14 6:59 AM:
---------------------------------------------------------------
[~aliciashu]
Thanks for testing.
During region split the daughter regions will be updated to meta even before
opening the regions. So if we get regions from admin we may get correct number
of regions and come out early from the while loop which may cause subsequent
operations to fail. That was the reason why checking whether the regions fully
assigned or not from master.
In the patch instead of checking from master checking split completion using
below method with excludeOfflinedSplitParents as false.
{code}
MetaReader#getTableRegions(CatalogTracker catalogTracker,
TableName tableName, final boolean excludeOfflinedSplitParents)
{code}
If number of table regions equal to
1) 4+i-1 means split may not yet started (continue while loop)
2) 4+i+1 means split parent still in meta means the region may not opened
and/or compaction has not yet completed (continue while loop).
3) 4+i means split has completed and then come out from while loop.
Can you please check tests in distributed cluster with the patch.
Thanks.
was (Author: rajesh23):
During region split the daughter regions will be updated to meta even before
opening the regions. So if we get regions from admin we may get correct number
of regions and come out early from the while loop which may cause subsequent
operations to fail. That was the reason why checking whether the regions fully
assigned or not from master.
In the patch Instead of checking from master scanning table regions from meta
using below method with excludeOfflinedSplitParents as false to check the
completion of region split.
{code}
MetaReader#getTableRegions(CatalogTracker catalogTracker,
TableName tableName, final boolean excludeOfflinedSplitParents)
{code}
If number of table regions equal to
1) 4+i-1 means split may not yet started (continue while loop)
2) 4+i+1 means split parent still in meta means the region may not opened
and/or compaction has not yet completed (continue while loop).
3) 4+i means split has completed and then come out from while loop.
Can you please check tests in distributed cluster with the patch.
Thanks,
> LocalIndexIT.testLocalIndexScanAfterRegionSplit() should use Admin to get
> regions
> ---------------------------------------------------------------------------------
>
> Key: PHOENIX-1356
> URL: https://issues.apache.org/jira/browse/PHOENIX-1356
> Project: Phoenix
> Issue Type: Bug
> Reporter: Alicia Ying Shu
> Assignee: Alicia Ying Shu
> Fix For: 5.0.0, 4.2
>
> Attachments: PHOENIX-1356-4.0.patch, PHOENIX-1356.patch
>
>
> testLocalIndexScanAfterRegionSplit can raise exception when running in
> distributed mode :
> testLocalIndexScanAfterRegionSplit(org.apache.phoenix.end2end.index.LocalIndexIT)
> MainThread|java.lang.RuntimeException:
> org.apache.hadoop.hbase.DistributedHBaseCluster@f497380 not an instance of
> org.apache.hadoop.hbase.MiniHBaseCluster
> org.apache.hadoop.hbase.HBaseTestingUtility.getMiniHBaseCluster(HBaseTestingUtility.java:938)
> org.apache.hadoop.hbase.HBaseTestingUtility.getHBaseCluster(HBaseTestingUtility.java:2500)
> org.apache.phoenix.end2end.index.LocalIndexIT.testLocalIndexScanAfterRegionSplit(LocalIndexIT.java:627)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)