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 @@ -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 @@ -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 @@ -55,7 +55,7 @@ public String description() {

@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 @@ -54,7 +54,7 @@ public String keyword() {

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

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

@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 @@ -134,7 +134,7 @@ public String keyword() {

@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 @@ -170,7 +170,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 @@ -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, "check", 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-zoo", 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 @@ -233,7 +233,7 @@ public void testExpectedClasses() {
expectSet.add(new CommandInfo(CommandGroups.INSTANCE, "remove-scan-server-references",
ScanServerMetadataEntries.class));
expectSet
.add(new CommandInfo(CommandGroups.CONFIG, "restore-zookeeper", RestoreZookeeper.class));
.add(new CommandInfo(CommandGroups.ZOOKEEPER, "restore-zookeeper", 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 +247,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, "zoo-info-viewer", ZooInfoViewer.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "zoo-prop-editor", ZooPropEditor.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "zoo-zap", ZooZap.class));
expectSet.add(new CommandInfo(CommandGroups.ZOOKEEPER, "zk-cli", ZooKeeperMain.class));

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