You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Gregory Chanan (JIRA)" <ji...@apache.org> on 2012/05/26 00:05:23 UTC

[jira] [Created] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Gregory Chanan created HBASE-6108:
-------------------------------------

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


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

        

[jira] [Commented] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283796#comment-13283796 ] 

Hadoop QA commented on HBASE-6108:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12529809/HBASE-6108.patch
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 60 new or modified tests.

    +1 hadoop23.  The patch compiles against the hadoop 0.23.x profile.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 33 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.client.TestFromClientSide

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2004//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2004//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2004//console

This message is automatically generated.
                
> 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

        

[jira] [Commented] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Zhihong Yu (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Updated] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Gregory Chanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Chanan updated HBASE-6108:
----------------------------------

    Status: Patch Available  (was: Open)
    
> 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

        

[jira] [Updated] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Gregory Chanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Chanan updated HBASE-6108:
----------------------------------

    Attachment: HBASE-6108.patch
    
> 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

        

[jira] [Commented] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285027#comment-13285027 ] 

Hudson commented on HBASE-6108:
-------------------------------

Integrated in HBase-TRUNK #2944 (See [https://builds.apache.org/job/HBase-TRUNK/2944/])
    HBASE-6108 Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close() (Revision 1343857)

     Result = FAILURE
stack : 
Files : 
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestOpenedRegionHandler.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java

                
> 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
>             Fix For: 0.96.0
>
>         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

        

[jira] [Commented] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285280#comment-13285280 ] 

Hudson commented on HBASE-6108:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #31 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/31/])
    HBASE-6108 Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close() (Revision 1343857)

     Result = FAILURE
stack : 
Files : 
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestCase.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestOpenedRegionHandler.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWithBloomError.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSeekOptimizations.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java
* /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestMergeTool.java

                
> 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
>             Fix For: 0.96.0
>
>         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

        

[jira] [Updated] (HBASE-6108) Use HRegion.closeHRegion instead of HRegion.close() and HRegion.getLog().close()

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-6108:
-------------------------

       Resolution: Fixed
    Fix Version/s: 0.96.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

Committed to trunk.  Thanks for the patch Gregory.
                
> 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
>             Fix For: 0.96.0
>
>         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