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

Zhihong Yu commented on HBASE-6108:
-----------------------------------

TestFromClientSide passed locally on MacBook.

Patch looks good.
                
> Use HRegion.closeHRegion instead of HRegion.close() and 
> HRegion.getLog().close()
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-6108
>                 URL: https://issues.apache.org/jira/browse/HBASE-6108
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: Gregory Chanan
>            Assignee: Gregory Chanan
>            Priority: Minor
>         Attachments: HBASE-6108.patch
>
>
> There are a bunch of places in the code like this:
> region.close();
> region.getLog().closeAndDelete();
> Instead of the better:
> HRegion.closeHRegion(region);
> We should change these for a few reasons:
> 1) If we ever need to change the implementation, it's easier to change in one 
> place
> 2) closeHRegion properly checks for nulls.  There are a few places where this 
> could make a difference, for example in TestOpenedRegionHandler.java it's 
> possible that an exception can be thrown before "region" is assigned and thus 
> region.close() could throw an NPE.  closeHRegion avoids this issue.

--
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