You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2009/07/02 01:52:47 UTC

[jira] Created: (HBASE-1602) HRegionServer won't go down since we added in new LruBlockCache

HRegionServer won't go down since we added in new LruBlockCache
---------------------------------------------------------------

                 Key: HBASE-1602
                 URL: https://issues.apache.org/jira/browse/HBASE-1602
             Project: Hadoop HBase
          Issue Type: Bug
            Reporter: stack
             Fix For: 0.20.0
         Attachments: shutdown.patch

New LruBlockCache uses thread excecutor scheduling stats dumping.  The scheduled excecutor needs to be cancelled else it just stays running stopping the HRS going down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1602) HRegionServer won't go down since we added in new LruBlockCache

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

Andrew Purtell commented on HBASE-1602:
---------------------------------------

Ah, that explains that. Thanks stack. 

> HRegionServer won't go down since we added in new LruBlockCache
> ---------------------------------------------------------------
>
>                 Key: HBASE-1602
>                 URL: https://issues.apache.org/jira/browse/HBASE-1602
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.20.0
>
>         Attachments: shutdown.patch
>
>
> New LruBlockCache uses thread excecutor scheduling stats dumping.  The scheduled excecutor needs to be cancelled else it just stays running stopping the HRS going down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HBASE-1602) HRegionServer won't go down since we added in new LruBlockCache

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

stack resolved HBASE-1602.
--------------------------

    Resolution: Fixed
      Assignee: stack

Committed after testing.  Easy to reproduce the problem.

> HRegionServer won't go down since we added in new LruBlockCache
> ---------------------------------------------------------------
>
>                 Key: HBASE-1602
>                 URL: https://issues.apache.org/jira/browse/HBASE-1602
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.20.0
>
>         Attachments: shutdown.patch
>
>
> New LruBlockCache uses thread excecutor scheduling stats dumping.  The scheduled excecutor needs to be cancelled else it just stays running stopping the HRS going down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-1602) HRegionServer won't go down since we added in new LruBlockCache

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

stack commented on HBASE-1602:
------------------------------

Committing the below under the aegis if this issue:
{code}
Index: src/java/org/apache/hadoop/hbase/master/HMaster.java
===================================================================
--- src/java/org/apache/hadoop/hbase/master/HMaster.java        (revision 790761)
+++ src/java/org/apache/hadoop/hbase/master/HMaster.java        (working copy)
@@ -271,6 +271,12 @@
   private void bootstrap() throws IOException {
     LOG.info("BOOTSTRAP: creating ROOT and first META regions");
     try {
+      // Bootstrapping, make sure blockcache is off.  Else, one will be
+      // created here in bootstap and it'll need to be cleaned up.  Better to
+      // not make it in first place.  Turn off block caching for bootstrap.
+      // Enable after.
+      setBlockCaching(HRegionInfo.ROOT_REGIONINFO, false);
+      setBlockCaching(HRegionInfo.FIRST_META_REGIONINFO, false);
       HRegion root = HRegion.createHRegion(HRegionInfo.ROOT_REGIONINFO,
         this.rootdir, this.conf);
       HRegion meta = HRegion.createHRegion(HRegionInfo.FIRST_META_REGIONINFO,
@@ -281,6 +287,8 @@
       root.getLog().closeAndDelete();
       meta.close();
       meta.getLog().closeAndDelete();
+      setBlockCaching(HRegionInfo.ROOT_REGIONINFO, true);
+      setBlockCaching(HRegionInfo.FIRST_META_REGIONINFO, true);
     } catch (IOException e) {
       e = RemoteExceptionHandler.checkIOException(e);
       LOG.error("bootstrap", e);
@@ -288,6 +296,16 @@
     }
   }
 
+  /*
+   * @param hri Set all family block caching to <code>b</code>
+   * @param b
+   */
+  private void setBlockCaching(final HRegionInfo hri, final boolean b) {
+    for (HColumnDescriptor hcd: hri.getTableDesc().families.values()) {
+      hcd.setBlockCacheEnabled(b);
+    }
+  }
+
{code}

There was a subtle condition where a BlockCache would be made in the master if we did a bootstrap.  If the block cache was the default LruBlockCache, then it needs a shutdown to go down else the JVM stays up.

> HRegionServer won't go down since we added in new LruBlockCache
> ---------------------------------------------------------------
>
>                 Key: HBASE-1602
>                 URL: https://issues.apache.org/jira/browse/HBASE-1602
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.20.0
>
>         Attachments: shutdown.patch
>
>
> New LruBlockCache uses thread excecutor scheduling stats dumping.  The scheduled excecutor needs to be cancelled else it just stays running stopping the HRS going down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-1602) HRegionServer won't go down since we added in new LruBlockCache

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

stack updated HBASE-1602:
-------------------------

    Attachment: shutdown.patch

Add a shutdown the the BlockCache interface.  Change SimpleBlockCache and LruBlockCache so they implement new shutdown.

> HRegionServer won't go down since we added in new LruBlockCache
> ---------------------------------------------------------------
>
>                 Key: HBASE-1602
>                 URL: https://issues.apache.org/jira/browse/HBASE-1602
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.0
>
>         Attachments: shutdown.patch
>
>
> New LruBlockCache uses thread excecutor scheduling stats dumping.  The scheduled excecutor needs to be cancelled else it just stays running stopping the HRS going down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.