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

Roman Shaposhnik commented on HBASE-4209:
-----------------------------------------

stack, thanks for the clarifications -- much appreciated! Now, as I said, I 
only see addShutdownHook call in regionserver code:
{noformat}
$ git grep addShutdownHook
src/main/java/org/apache/hadoop/hbase/regionserver/ShutdownHook.java:    
Runtime.getRuntime().addShutdownHook(t);
{noformat}
and then
{noformat}
 /**
   * @param hrs
   * @param name
   * @return Thread the RegionServer is running in correctly named.
   * @throws IOException
   */
  public static Thread startRegionServer(final HRegionServer hrs,
      final String name) throws IOException {
    Thread t = new Thread(hrs);
    t.setName(name);
    t.start();
    // Install shutdown hook that will catch signals and run an orderly shutdown
    // of the hrs.
    ShutdownHook.install(hrs.getConfiguration(), FileSystem.get(hrs
        .getConfiguration()), hrs, t);
    return t;
  }
{noformat}

Now, the behavior that I observe is that when HBase is running in a distributed 
fashion, flushing of the newly created tables happen when regionserve receives 
a SIGTERM. When it is running in a standalone configuration tables don't get 
flushed UNLESS I explicitly call stop-hbase.sh before sending a SIGTERM.

Once would assume that the same code would be called in both cases since it is 
registering that hook unconditionally. What am I missing here?

> The HBase hbase-daemon.sh SIGKILLs master when stopping it
> ----------------------------------------------------------
>
>                 Key: HBASE-4209
>                 URL: https://issues.apache.org/jira/browse/HBASE-4209
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>            Reporter: Roman Shaposhnik
>
> There's a bit of code in hbase-daemon.sh that makes HBase master being 
> SIGKILLed when stopping it rather than trying SIGTERM (like it does for other 
> daemons). When HBase is executed in a standalone mode (and the only daemon 
> you need to run is master) that causes newly created tables to go missing as 
> unflushed data is thrown out. If there was not a good reason to kill master 
> with SIGKILL perhaps we can take that special case out and rely on SIGTERM.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to