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

Zhihong Yu commented on HBASE-5396:
-----------------------------------

@Jieshan:
Have you tested your patch in a 0.90 cluster ?
{code}
+  public boolean isRegionOnline(HRegionInfo hri) {
+    HServerInfo hsi = this.regions.get(hri);
+    if (hsi != null && this.isServerOnline(hsi.getServerName())) {
{code}
If hsi isn't online, should we remove region to server assignment mapping for 
hsi ?

For RegionsWithDeadServer, would DeadServerWithRegions be a better name ?
{code}
+    private Set<HRegionInfo> regionPlanOnThisServer = null;
{code}
Since the member of the Set isn't RegionPlan, I suggest renaming the above 
field to regionsOnServer.

Also, I think regionsOnServer and regionsInTransition should be initialized 
with empty HashSet. This would potentially avoid NPE in a few places.
                
> Handle the regions in regionPlans while processing ServerShutdownHandler
> ------------------------------------------------------------------------
>
>                 Key: HBASE-5396
>                 URL: https://issues.apache.org/jira/browse/HBASE-5396
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.90.6
>            Reporter: Jieshan Bean
>            Assignee: Jieshan Bean
>             Fix For: 0.90.7
>
>         Attachments: HBASE-5396-90.patch
>
>
> The regions plan to open on this server while ServerShutdownHandler is 
> handling, just be removed from AM.regionPlans, and only left to 
> TimeoutMonitor handle these regions. This need to optimize.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to