Search in sources :

Example 1 with Token

use of org.apache.accumulo.shell.Token in project accumulo by apache.

the class GrantCommand method registerCompletion.

@Override
public void registerCompletion(final Token root, final Map<Command.CompletionSet, Set<String>> completionSet) {
    final Token cmd = new Token(getName());
    cmd.addSubcommand(new Token(TablePermission.printableValues()));
    cmd.addSubcommand(new Token(SystemPermission.printableValues()));
    cmd.addSubcommand(new Token(NamespacePermission.printableValues()));
    root.addSubcommand(cmd);
}
Also used : Token(org.apache.accumulo.shell.Token)

Example 2 with Token

use of org.apache.accumulo.shell.Token in project accumulo by apache.

the class ConfigCommand method registerCompletion.

@Override
public void registerCompletion(final Token root, final Map<Command.CompletionSet, Set<String>> completionSet) {
    final Token cmd = new Token(getName());
    final Token sub = new Token("-" + setOpt.getOpt());
    for (Property p : Property.values()) {
        if (!(p.getKey().endsWith(".")) && !p.isExperimental()) {
            sub.addSubcommand(new Token(p.toString()));
        }
    }
    cmd.addSubcommand(sub);
    root.addSubcommand(cmd);
}
Also used : Token(org.apache.accumulo.shell.Token) Property(org.apache.accumulo.core.conf.Property)

Example 3 with Token

use of org.apache.accumulo.shell.Token in project accumulo by apache.

the class DebugCommand method registerCompletion.

@Override
public void registerCompletion(final Token root, final Map<Command.CompletionSet, Set<String>> special) {
    final Token debug_command = new Token(getName());
    debug_command.addSubcommand(Arrays.asList(new String[] { "on", "off" }));
    root.addSubcommand(debug_command);
}
Also used : Token(org.apache.accumulo.shell.Token)

Example 4 with Token

use of org.apache.accumulo.shell.Token in project accumulo by apache.

the class RevokeCommand method registerCompletion.

@Override
public void registerCompletion(final Token root, final Map<Command.CompletionSet, Set<String>> completionSet) {
    final Token cmd = new Token(getName());
    cmd.addSubcommand(new Token(TablePermission.printableValues()));
    cmd.addSubcommand(new Token(SystemPermission.printableValues()));
    cmd.addSubcommand(new Token(NamespacePermission.printableValues()));
    root.addSubcommand(cmd);
}
Also used : Token(org.apache.accumulo.shell.Token)

Aggregations

Token (org.apache.accumulo.shell.Token)4 Property (org.apache.accumulo.core.conf.Property)1