HBase
  1. HBase
  2. HBASE-5466

Opening a table also opens the metatable and never closes it.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.5, 0.92.0
    • Fix Version/s: 0.90.7, 0.92.1, 0.94.0
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Having upgraded to CDH3U3 version of hbase we found we had a zookeeper connection leak, tracking it down we found that closing the connection will only close the zookeeper connection if all calls to get the connection have been closed, there is incCount and decCount in the HConnection class,

      When a table is opened it makes a call to the metascanner class which opens a connection to the meta table, this table never gets closed.

      This caused the count in the HConnection class to never return to zero meaning that the zookeeper connection will not close when we close all the tables or calling
      HConnectionManager.deleteConnection(config, true);

      1. MetaScanner_HBASE_5466(3).patch
        3 kB
        Ashley Taylor
      2. MetaScanner_HBASE_5466(2).patch
        3 kB
        Ashley Taylor
      3. MetaScanner_HBASE_5466.patch
        3 kB
        Ashley Taylor

        Activity

        Hide
        Ashley Taylor added a comment -

        patch to make sure the metatable gets closed when the table is opened before it falls out of scope

        Show
        Ashley Taylor added a comment - patch to make sure the metatable gets closed when the table is opened before it falls out of scope
        Hide
        Ted Yu added a comment -

        Thanks for the finding.

        +      }finally{
        +    	  if(metaTable!=null){
        +    		  metaTable.close();
        +    	  }
        

        We use two spaces for indentation.

        Can you regenerate patch ? Refer to HBASE-3678.

        Show
        Ted Yu added a comment - Thanks for the finding. + } finally { + if (metaTable!= null ){ + metaTable.close(); + } We use two spaces for indentation. Can you regenerate patch ? Refer to HBASE-3678 .
        Hide
        Ashley Taylor added a comment -

        patch regenerated thanks for the link to that jira task.

        Show
        Ashley Taylor added a comment - patch regenerated thanks for the link to that jira task.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515823/MetaScanner_HBASE_5466%282%29.patch
        against trunk revision .

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

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

        -1 findbugs. The patch appears to introduce 152 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.mapreduce.TestHFileOutputFormat
        org.apache.hadoop.hbase.mapred.TestTableMapReduce
        org.apache.hadoop.hbase.mapreduce.TestImportTsv

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

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515823/MetaScanner_HBASE_5466%282%29.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 152 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.mapreduce.TestHFileOutputFormat org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestImportTsv Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1030//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1030//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1030//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515823/MetaScanner_HBASE_5466%282%29.patch
        against trunk revision .

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

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

        -1 findbugs. The patch appears to introduce 152 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.io.hfile.TestForceCacheImportantBlocks
        org.apache.hadoop.hbase.mapreduce.TestImportTsv
        org.apache.hadoop.hbase.mapred.TestTableMapReduce
        org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
        org.apache.hadoop.hbase.TestZooKeeper

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

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515823/MetaScanner_HBASE_5466%282%29.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 152 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.io.hfile.TestForceCacheImportantBlocks org.apache.hadoop.hbase.mapreduce.TestImportTsv org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat org.apache.hadoop.hbase.TestZooKeeper Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1031//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1031//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1031//console This message is automatically generated.
        Hide
        stack added a comment -

        +1 on patch (except for the spacing that is not like the rest of the file)

        Show
        stack added a comment - +1 on patch (except for the spacing that is not like the rest of the file)
        Hide
        Ted Yu added a comment -

        TestZooKeeper passed locally with patch v2.

        +      }finally{
        +        if(metaTable!=null){
        

        There should be a space between } and finally, finally and {, if and (, ) and {

        Overall, +1 on patch v2. Please fix formatting in v3.

        Show
        Ted Yu added a comment - TestZooKeeper passed locally with patch v2. + } finally { + if (metaTable!= null ){ There should be a space between } and finally, finally and {, if and (, ) and { Overall, +1 on patch v2. Please fix formatting in v3.
        Hide
        Ashley Taylor added a comment -

        Thanks for the feedback this is my first patch to hbase.

        Show
        Ashley Taylor added a comment - Thanks for the feedback this is my first patch to hbase.
        Hide
        Ted Yu added a comment -

        Patch v3 looks good to me.

        @Stack:
        Should this go to 0.92.1 ?

        Show
        Ted Yu added a comment - Patch v3 looks good to me. @Stack: Should this go to 0.92.1 ?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12515845/MetaScanner_HBASE_5466%283%29.patch
        against trunk revision .

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javadoc. The javadoc tool appears to have generated -136 warning messages.

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

        -1 findbugs. The patch appears to introduce 152 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.mapreduce.TestImportTsv
        org.apache.hadoop.hbase.mapred.TestTableMapReduce
        org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
        org.apache.hadoop.hbase.master.TestSplitLogManager

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

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12515845/MetaScanner_HBASE_5466%283%29.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated -136 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 152 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.mapreduce.TestImportTsv org.apache.hadoop.hbase.mapred.TestTableMapReduce org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat org.apache.hadoop.hbase.master.TestSplitLogManager Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1033//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1033//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1033//console This message is automatically generated.
        Hide
        stack added a comment -

        @Ted Yes please.

        Show
        stack added a comment - @Ted Yes please.
        Hide
        Ted Yu added a comment -

        Integrated to 0.92 and TRUNK.

        Thanks for the patch Ashley.

        Thanks for the review, Stack.

        Show
        Ted Yu added a comment - Integrated to 0.92 and TRUNK. Thanks for the patch Ashley. Thanks for the review, Stack.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #301 (See https://builds.apache.org/job/HBase-0.92/301/)
        HBASE-5466 Opening a table also opens the metatable and never closes it - place JIRA at the right position in CHANGES.txt
        (Ashley Taylor) (Revision 1293048)
        HBASE-5466 Opening a table also opens the metatable and never closes it
        (Ashley Taylor) (Revision 1293045)

        Result = SUCCESS
        tedyu :
        Files :

        • /hbase/branches/0.92/CHANGES.txt

        tedyu :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #301 (See https://builds.apache.org/job/HBase-0.92/301/ ) HBASE-5466 Opening a table also opens the metatable and never closes it - place JIRA at the right position in CHANGES.txt (Ashley Taylor) (Revision 1293048) HBASE-5466 Opening a table also opens the metatable and never closes it (Ashley Taylor) (Revision 1293045) Result = SUCCESS tedyu : Files : /hbase/branches/0.92/CHANGES.txt tedyu : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-security #121 (See https://builds.apache.org/job/HBase-TRUNK-security/121/)
        HBASE-5466 Opening a table also opens the metatable and never closes it
        (Ashley Taylor) (Revision 1293047)

        Result = SUCCESS
        tedyu :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-security #121 (See https://builds.apache.org/job/HBase-TRUNK-security/121/ ) HBASE-5466 Opening a table also opens the metatable and never closes it (Ashley Taylor) (Revision 1293047) Result = SUCCESS tedyu : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #2669 (See https://builds.apache.org/job/HBase-TRUNK/2669/)
        HBASE-5466 Opening a table also opens the metatable and never closes it
        (Ashley Taylor) (Revision 1293047)

        Result = SUCCESS
        tedyu :
        Files :

        • /hbase/trunk/CHANGES.txt
        • /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #2669 (See https://builds.apache.org/job/HBase-TRUNK/2669/ ) HBASE-5466 Opening a table also opens the metatable and never closes it (Ashley Taylor) (Revision 1293047) Result = SUCCESS tedyu : Files : /hbase/trunk/CHANGES.txt /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #96 (See https://builds.apache.org/job/HBase-0.92-security/96/)
        HBASE-5466 Opening a table also opens the metatable and never closes it - place JIRA at the right position in CHANGES.txt
        (Ashley Taylor) (Revision 1293048)
        HBASE-5466 Opening a table also opens the metatable and never closes it
        (Ashley Taylor) (Revision 1293045)

        Result = FAILURE
        tedyu :
        Files :

        • /hbase/branches/0.92/CHANGES.txt

        tedyu :
        Files :

        • /hbase/branches/0.92/CHANGES.txt
        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #96 (See https://builds.apache.org/job/HBase-0.92-security/96/ ) HBASE-5466 Opening a table also opens the metatable and never closes it - place JIRA at the right position in CHANGES.txt (Ashley Taylor) (Revision 1293048) HBASE-5466 Opening a table also opens the metatable and never closes it (Ashley Taylor) (Revision 1293045) Result = FAILURE tedyu : Files : /hbase/branches/0.92/CHANGES.txt tedyu : Files : /hbase/branches/0.92/CHANGES.txt /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java
        Hide
        Shaneal Manek added a comment -

        Hi, I'm running into this problem on a 0.90 cluster.

        The patch seems to apply cleanly to 0.90 branch - could a committer add it there too?

        Show
        Shaneal Manek added a comment - Hi, I'm running into this problem on a 0.90 cluster. The patch seems to apply cleanly to 0.90 branch - could a committer add it there too?
        Hide
        Ted Yu added a comment -

        Integrated to 0.90.7 as well.

        Show
        Ted Yu added a comment - Integrated to 0.90.7 as well.
        Hide
        stack added a comment -

        Committed to 0.90 branch at Shaneal's request.

        Show
        stack added a comment - Committed to 0.90 branch at Shaneal's request.
        Hide
        Jonathan Hsieh added a comment -

        This happend pre-0.94 branch, added fixver that this is in 0.94.

        Show
        Jonathan Hsieh added a comment - This happend pre-0.94 branch, added fixver that this is in 0.94.

          People

          • Assignee:
            Ashley Taylor
            Reporter:
            Ashley Taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development