accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/5] git commit: ACCUMULO-3192 add -np to accumulo fate command
Date Wed, 01 Oct 2014 22:24:27 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 43ef53ed3 -> 2b689a2f6


ACCUMULO-3192 add -np to accumulo fate command


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c5afc5a4
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c5afc5a4
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c5afc5a4

Branch: refs/heads/master
Commit: c5afc5a44fa9bf44301c86d632fcd43758184222
Parents: 2ad4074
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Oct 1 18:19:24 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Oct 1 18:19:24 2014 -0400

----------------------------------------------------------------------
 .../apache/accumulo/core/util/shell/commands/FateCommand.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c5afc5a4/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FateCommand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FateCommand.java
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FateCommand.java
index e3be645..ce670cb 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FateCommand.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/FateCommand.java
@@ -55,6 +55,7 @@ public class FateCommand extends Command {
   
   private Option secretOption;
   private Option statusOption;
+  private Option disablePaginationOpt;
   
   @Override
   public int execute(final String fullCommand, final CommandLine cl, final Shell shellState)
throws ParseException, KeeperException, InterruptedException,
@@ -131,7 +132,7 @@ public class FateCommand extends Command {
       StringBuilder buf = new StringBuilder(8096);
       Formatter fmt = new Formatter(buf);
       admin.print(zs, zk, ZooUtil.getRoot(instance) + Constants.ZTABLE_LOCKS, fmt, filterTxid,
filterStatus);
-      shellState.printLines(Collections.singletonList(buf.toString()).iterator(), true);
+      shellState.printLines(Collections.singletonList(buf.toString()).iterator(), !cl.hasOption(disablePaginationOpt.getOpt()));
     } else {
       throw new ParseException("Invalid command option");
     }
@@ -170,6 +171,8 @@ public class FateCommand extends Command {
     statusOption.setArgs(Option.UNLIMITED_VALUES);
     statusOption.setOptionalArg(false);
     o.addOption(statusOption);
+    disablePaginationOpt = new Option("np", "no-pagination", false, "disables pagination
of output");
+    o.addOption(disablePaginationOpt);
     return o;
   }
   


Mime
View raw message