accumulo-notifications 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] (ACCUMULO-4152) Create command to dump stack for FATE operation
Date Mon, 29 Feb 2016 17:06:18 GMT

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

ASF GitHub Bot commented on ACCUMULO-4152:
------------------------------------------

Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/77#discussion_r54441340
  
    --- Diff: shell/src/main/java/org/apache/accumulo/shell/commands/FateCommand.java ---
    @@ -53,6 +67,51 @@
     
       private static final String USER = "accumulo";
     
    +  // this class serializes references to interfaces with the concrete class name
    +  private static class InterfaceSerializer<T> implements JsonSerializer<T>
{
    +    @Override
    +    public JsonElement serialize(T link, Type type, JsonSerializationContext context)
{
    +      JsonElement je = context.serialize(link, link.getClass());
    +      JsonObject jo = new JsonObject();
    +      jo.add(link.getClass().getName(), je);
    +      return jo;
    +    }
    +  }
    +
    +  // the purpose of this class is to be serialized as JSon for display
    +  private static class ByteArrayContainer {
    +    @SuppressWarnings("unused")
    --- End diff --
    
    Would be better to delete these, rather than suppress warnings. If they are needed, then
please add a comment explaining why they should be left in place with the warning suppression
(here, and other occurrences below).


> Create command to dump stack for FATE operation
> -----------------------------------------------
>
>                 Key: ACCUMULO-4152
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4152
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Keith Turner
>             Fix For: 1.8.0
>
>
> Each FATE operation has an associated stack of serialized java objects in zookeeper.
 It would be nice to be able to see the contents of these objects.  One possible way to do
this is to serialize each object on the stack as json and print out the json.   Using json
avoids implementing a useful toString method for each type of fate object.



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

Mime
View raw message