Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public ZooInfoViewer() {

@Override
public String keyword() {
return "zoo-info-viewer";
return "info-viewer";
}

@Override
Expand All @@ -113,7 +113,7 @@ public String description() {

@Override
public CommandGroup commandGroup() {
return CommandGroups.CONFIG;
return CommandGroups.ZOOKEEPER;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public ZooPropEditor() {

@Override
public String keyword() {
return "zoo-prop-editor";
return "prop-editor";
}

@Override
Expand All @@ -87,7 +87,7 @@ public String description() {

@Override
public CommandGroup commandGroup() {
return CommandGroups.CONFIG;
return CommandGroups.ZOOKEEPER;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ public DumpZookeeper() {

@Override
public String keyword() {
return "dump-zoo";
return "dump";
}

@Override
public String description() {
return "Writes Zookeeper data as human readable or XML to a file.";
return "Writes ZooKeeper data as human readable or XML to a file.";
}

@Override
public CommandGroup commandGroup() {
return CommandGroups.CONFIG;
return CommandGroups.ZOOKEEPER;
}

private static class Encoded {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public String keyword() {

@Override
public CommandGroup commandGroup() {
return CommandGroups.INSTANCE;
return CommandGroups.CHECK;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public CommandGroup commandGroup() {

@Override
public String description() {
return "Starts Accumulo " + name;
return "Runs Accumulo " + name;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ public ZooKeeperMain() {

@Override
public String keyword() {
return "zk-cli";
return "cli";
}

@Override
public CommandGroup commandGroup() {
return CommandGroups.INSTANCE;
return CommandGroups.ZOOKEEPER;
}

@Override
public String description() {
return "Starts an Apache Zookeeper client rooted at the current instance.";
return "Starts an Apache ZooKeeper client rooted at the current instance.";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ public ZooZap() {

@Override
public String keyword() {
return "zoo-zap";
return "zap";
}

@Override
public String description() {
return "Utility for zapping Zookeeper locks";
return "Utility for zapping ZooKeeper locks";
}

@Override
public CommandGroup commandGroup() {
return CommandGroups.PROCESS;
return CommandGroups.ZOOKEEPER;
}

static class ZapOpts extends ServerOpts {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ public RestoreZookeeper() {

@Override
public String keyword() {
return "restore-zookeeper";
return "restore";
}

@Override
public CommandGroup commandGroup() {
return CommandGroups.CONFIG;
return CommandGroups.ZOOKEEPER;
}

@Override
public String description() {
return "Restore Zookeeper data from a file.";
return "Restore ZooKeeper data from a file.";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ public <T extends CheckCommandOpts> SystemCheck(T testOpts) {

@Override
public String keyword() {
return "check";
return "system";
}

@Override
public CommandGroup commandGroup() {
return CommandGroups.INSTANCE;
return CommandGroups.CHECK;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String keyword() {

@Override
public CommandGroup commandGroup() {
return CommandGroups.INSTANCE;
return CommandGroups.CHECK;
}

@Override
Expand Down
5 changes: 3 additions & 2 deletions start/src/main/java/org/apache/accumulo/start/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public static void main(final String[] args) throws Exception {
printUsage();
System.exit(1);
}
if (args[0].equals("-h") || args[0].equals("-help") || args[0].equals("--help")) {
if (args[0].equals("-h") || args[0].equals("-help") || args[0].equals("--help")
|| args[0].equals("-?")) {
printUsage();
return;
}
Expand Down Expand Up @@ -199,7 +200,7 @@ public static void printUsage() {
"""

Usage one of:
accumulo --help
accumulo --help | -help | -h | -?
Prints this help

accumulo classpath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class CommandGroups {
public static final CommandGroup OTHER = new OtherCommandGroup();
public static final CommandGroup PROCESS = new ProcessCommandGroup();
public static final CommandGroup TABLE = new TableCommandGroup();
public static final CommandGroup ZOOKEEPER = new ZookeeperCommandGroup();
public static final CommandGroup CHECK = new CheckCommandGroup();

/**
* @since 4.0.0
Expand Down Expand Up @@ -244,4 +246,48 @@ public String description() {
}
}

/**
* @since 4.0.0
*/
public static class ZookeeperCommandGroup extends BaseCommandGroup {

private ZookeeperCommandGroup() {}

@Override
public String key() {
return "zk";
}

@Override
public String title() {
return "ZooKeeper";
}

@Override
public String description() {
return "ZooKeeper related commands";
}
}

/**
* @since 4.0.0
*/
public static class CheckCommandGroup extends BaseCommandGroup {

@Override
public String key() {
return "check";
}

@Override
public String title() {
return "Check";
}

@Override
public String description() {
return "Troubleshooting and verification commands";
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void testExpectedClasses() {
expectSet.add(new CommandInfo(TestCommandGroup.INSTANCE, "binary-rows", TestBinaryRows.class));
expectSet.add(new CommandInfo(CommandGroups.COMPACTION, "cancel", CancelCompaction.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "change-secret", ChangeSecret.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "check", SystemCheck.class));
expectSet.add(new CommandInfo(CommandGroups.CHECK, "system", SystemCheck.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "check-accumulo-properties",
CheckAccumuloProperties.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "check-compaction-config",
Expand All @@ -196,7 +196,7 @@ public void testExpectedClasses() {
expectSet
.add(new CommandInfo(CommandGroups.INSTANCE, "delete-instance", DeleteZooInstance.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "dump-config", DumpConfig.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "dump-zoo", DumpZookeeper.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "dump", DumpZookeeper.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "import", ImportConfigCommand.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "export", ExportConfigCommand.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "fate", Fate.class));
Expand All @@ -221,8 +221,8 @@ public void testExpectedClasses() {
expectSet.add(new CommandInfo(CommandGroups.PROCESS, "manager", ManagerExecutable.class));
expectSet
.add(new CommandInfo(CommandGroups.PROCESS, "minicluster", MiniClusterExecutable.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "missing-files",
RemoveEntriesForMissingFiles.class));
expectSet.add(
new CommandInfo(CommandGroups.CHECK, "missing-files", RemoveEntriesForMissingFiles.class));
expectSet.add(new CommandInfo(CommandGroups.PROCESS, "monitor", MonitorExecutable.class));
expectSet.add(new CommandInfo(TestCommandGroup.INSTANCE, "multi-table-ingest",
TestMultiTableIngest.class));
Expand All @@ -232,8 +232,7 @@ public void testExpectedClasses() {
expectSet.add(new CommandInfo(TestCommandGroup.INSTANCE, "random-writer", RandomWriter.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "remove-scan-server-references",
ScanServerMetadataEntries.class));
expectSet
.add(new CommandInfo(CommandGroups.CONFIG, "restore-zookeeper", RestoreZookeeper.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "restore", RestoreZookeeper.class));
expectSet.add(new CommandInfo(CommandGroups.FILE, "rfile-info", PrintInfo.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "service-status", ServiceStatus.class));
expectSet.add(new CommandInfo(CommandGroups.CLIENT, "shell", Shell.class));
Expand All @@ -247,14 +246,14 @@ public void testExpectedClasses() {
expectSet.add(new CommandInfo(CommandGroups.PROCESS, "tserver", TServerExecutable.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "upgrade", UpgradeUtil.class));
expectSet.add(new CommandInfo(TestCommandGroup.INSTANCE, "verify-ingest", VerifyIngest.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "verify-tablet-assignments",
expectSet.add(new CommandInfo(CommandGroups.CHECK, "verify-tablet-assignments",
VerifyTabletAssignments.class));
expectSet.add(new CommandInfo(CommandGroups.CLIENT, "version", Version.class));
expectSet.add(new CommandInfo(CommandGroups.FILE, "wal-info", LogReader.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "zoo-info-viewer", ZooInfoViewer.class));
expectSet.add(new CommandInfo(CommandGroups.CONFIG, "zoo-prop-editor", ZooPropEditor.class));
expectSet.add(new CommandInfo(CommandGroups.PROCESS, "zoo-zap", ZooZap.class));
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "zk-cli", ZooKeeperMain.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "info-viewer", ZooInfoViewer.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "prop-editor", ZooPropEditor.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "zap", ZooZap.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "cli", ZooKeeperMain.class));

Map<CommandGroup,Map<String,KeywordExecutable>> actualExecutables = getKeywordExecutables();
SortedSet<CommandInfo> actualSet = new TreeSet<>();
Expand Down