You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Raul Gutierrez Segales (JIRA)" <ji...@apache.org> on 2015/06/04 20:47:38 UTC

[jira] [Commented] (ZOOKEEPER-2207) Enhance error logs with LearnerHandler.packetToString()

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

Raul Gutierrez Segales commented on ZOOKEEPER-2207:
---------------------------------------------------

Thanks [~mitake]! Will you fix packetToString in another patch (it would be good to do it in this one I think):

{code}
    static public String packetToString(QuorumPacket p) {
        if (true)
            return null;
{code}

?

Also, some nits:

Use {} instead of + in:

{code}
+            LOG.warn("unknown type " + LearnerHandler.packetToString(qp));
{code}

i.e.:

{code}
+            LOG.warn("Unknown packet type: {}", LearnerHandler.packetToString(qp));
{code}

Ditto for:

{code}
                 LOG.error("Got unexpected packet from leader "
-                        + qp.getType() + " exiting ... " );
+                        + LearnerHandler.packetToString(qp) + " exiting ... " );
{code}

And ditto for:

{code}
-                LOG.error("Next packet was supposed to be an ACK");
+                LOG.error("Next packet was supposed to be an ACK,"
+                    + "but recieved packet: " + packetToString(qp));
{code}


> Enhance error logs with LearnerHandler.packetToString()
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-2207
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2207
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>            Reporter: Hitoshi Mitake
>            Assignee: Hitoshi Mitake
>            Priority: Trivial
>         Attachments: ZOOKEEPER-2207.patch
>
>
> This patch enhances error logs related to unexpected types of QuorumPacket with LearnerHandler.packetToString().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)