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

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

Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/77#discussion_r54451870
  
    --- 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 --
    
    I will add some more comments


> 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)

Reply via email to