zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2795) Change log level for "ZKShutdownHandler is not registered" error message
Date Fri, 17 Nov 2017 21:12:00 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2795:
-------------------------------------------

Github user afine commented on the issue:

    https://github.com/apache/zookeeper/pull/273
  
    @phunt I'm trying to understand the problem you are describing. Please let me know what
I am missing.
    
    Since `QuorumZooKeeperServer` reimplements `setState` without `ZooKeeperServerShutdownHandler`
 I think this is only an issue when dealing with standalone ZooKeeper servers. 
    
    Standalone servers are only instantiated (outside of tests) in `ZooKeeperServerMain#runFromConfig`
(which also does the work of setting the `ZooKeeperServerShutdownHandler`).
    
    In other words, I think we are dealing with an unfortunate usage of inheritance. It would
be ideal to add this `ZooKeeperServerShutdownHandler` in a subclass of `ZooKeeperServer` used
only for standalone purposes but it looks like we did the opposite, putting in the `ZooKeeperServerShutdownHandler`
in the default case and reimplementing `setState` for the purpose of ignoring the `ZooKeeperServerShutdownHandler`
it in `QuorumZooKeeperServer`. 
    
    When the `ZooKeeperServerShutdownHandler` is needed it is always set (in production code).

    
    So I guess my question is, what problem would an operator be debugging with this log message?
     


> Change log level for "ZKShutdownHandler is not registered" error message
> ------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2795
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2795
>             Project: ZooKeeper
>          Issue Type: Wish
>    Affects Versions: 3.4.10, 3.5.3, 3.6.0
>            Reporter: Andy Chambers
>            Assignee: Abraham Fine
>            Priority: Trivial
>
> We have an integration test suite that starts up an embedded version of zookeeper as
part of a suite of services.
> However because it doesn't register a shutdown handler, we get lots of warnings that
look like this
> 17-05-30 15:04:56 achambers.local ERROR [org.apache.zookeeper.server.ZooKeeperServer:472]
- ZKShutdownHandler is not registered, so ZooKeeper server won't take any action on ERROR
or SHUTDOWN server state changes
> My java is a bit rusty but I think I can't create one of these shutdown handlers from
outside the "org.apache.zookeeper.server" package because the constructor has not been marked
"public". Would it be possible to do so?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message