accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request: ACCUMULO-4152 add fate dump command
Date Mon, 29 Feb 2016 18:18:44 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/77#discussion_r54452009
  
    --- Diff: fate/src/main/java/org/apache/accumulo/fate/ZooStore.java ---
    @@ -458,4 +458,43 @@ public Serializable getProperty(long tid, String prop) {
           throw new RuntimeException(e);
         }
       }
    +
    +  @SuppressWarnings("unchecked")
    +  @Override
    +  public List<ReadOnlyRepo<T>> getStack(long tid) {
    +    String txpath = getTXPath(tid);
    +
    +    outer: while (true) {
    +      List<String> ops;
    +      try {
    +        ops = zk.getChildren(txpath);
    +      } catch (KeeperException.NoNodeException e) {
    +        return null;
    +      } catch (KeeperException | InterruptedException e1) {
    +        throw new RuntimeException(e1);
    +      }
    +
    +      ops = new ArrayList<String>(ops);
    +      Collections.sort(ops, Collections.reverseOrder());
    +
    +      ArrayList<ReadOnlyRepo<T>> dops = new ArrayList<>();
    +
    +      for (String child : ops) {
    +        if (child.startsWith("repo_")) {
    +          byte[] ser;
    +          try {
    +            ser = zk.getData(txpath + "/" + child, null);
    +            dops.add((ReadOnlyRepo<T>) deserialize(ser));
    --- End diff --
    
    I wanted more narrow supression, but was not quite sure how to achieve that


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message