@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-u", "--user") .dest("user") .type(String.class) .required(true) .help("The user to remove"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-c", "--count") .dest("count") .type(Integer.class) .help("limit script to the specified number of pending change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
@Override public void configure(Subparser subparser) { subparser.addArgument("-ca", "--ca") .dest("ca") .action(Arguments.storeTrue()) .setDefault(Boolean.FALSE) .help("Generate CA parameters"); subparser.addArgument("-k", "--key") .dest("key") .type(String.class) .help("The CA private signing key"); subparser.addArgument("-i", "--id") .dest("keyId") .type(Integer.class) .help("The key ID to create"); }
.type(String.class); .type(String.class) .help("ZooKeeper master password (for ZooKeeper ACLs). If the " + ZK_MASTER_PASSWORD_ENVVAR .type(Long.class) .setDefault(TimeUnit.DAYS.toHours(14)) .help("In hours. Agents will be automatically de-registered if they are DOWN for more " .type(Long.class) .setDefault(-1L) .help("In days. Jobs not deployed anywhere and with a job history showing they were last "
public DeploymentGroupWatchCommand(Subparser parser) { super(parser); parser.help("watch deployment groups"); nameArg = parser.addArgument("name") .help("Deployment group name"); fullArg = parser.addArgument("-f") .action(storeTrue()) .help("Print full hostnames and job ids."); intervalArg = parser.addArgument("--interval") .type(Integer.class) .setDefault(1) .help("polling interval, default 1 second"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-n", "--dry-run") .action(Arguments.storeTrue()) .dest("dry-run") .setDefault(Boolean.FALSE) .help("Output the DDL to stdout, don't run it"); subparser.addArgument("-t", "--tag").dest("tag").help("Rollback to the given tag"); subparser.addArgument("-d", "--date") .dest("date") .type(Date.class) .help("Rollback to the given date"); subparser.addArgument("-c", "--count") .dest("count") .type(Integer.class) .help("Rollback the specified number of change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
public static void main(String[] args) throws Exception { ArgumentParser parser = ArgumentParsers.newArgumentParser("ImpressionsToInfluxDb") .defaultHelp(true) .description("Read Seldon impressions and send stats to influx db"); parser.addArgument("-t", "--topic").setDefault("actions").help("Kafka topic to read from"); parser.addArgument("-c", "--client").required(true).help("Client to run item similarity"); parser.addArgument("-o", "--output-topic").required(true).help("Output topic"); parser.addArgument("-k", "--kafka").setDefault("localhost:9092").help("Kafka server and port"); parser.addArgument("-z", "--zookeeper").setDefault("localhost:2181").help("Zookeeper server and port"); parser.addArgument("-w", "--window-secs").type(Integer.class).setDefault(3600*5).help("streaming window size in secs, -1 means ignore"); parser.addArgument("-u", "--window-processed").type(Integer.class).setDefault(-1).help("streaming window size in processed count, -1 means ignore"); parser.addArgument("--output-poll-secs").type(Integer.class).setDefault(60).help("output timer polling period in secs"); parser.addArgument("--hashes").type(Integer.class).setDefault(100).help("number of hashes"); parser.addArgument("-m", "--min-activity").type(Integer.class).setDefault(200).help("min activity"); parser.addArgument("-p", "--parse-date-method").choices("json-time","json-utc","system").setDefault("json-time").help("min activity"); Namespace ns = null; try { ns = parser.parseArgs(args); ItemSimilarityProcessor processor = new ItemSimilarityProcessor(ns); processor.process(ns); } catch (ArgumentParserException e) { parser.handleError(e); System.exit(1); } }
+ "by specifying the option path and value as an optional argument, e.g. --cluster.node.id node-1"); parser.addArgument("--member", "-m") .type(String.class) .nargs("?") .required(false) .help("The local member identifier, used in intra-cluster communication."); parser.addArgument("--address", "-a") .type(addressArgumentType) .metavar("HOST:PORT") .nargs("?") .help("The address for the local member. If no address is specified, the first public interface will be used."); parser.addArgument("--host") .type(String.class) .nargs("?") .required(false) .help("The host on which this member runs, used for host-aware partition management."); parser.addArgument("--rack") .type(String.class) .nargs("?") .required(false) .help("The rack on which this member runs, used for rack-aware partition management."); parser.addArgument("--zone") .type(String.class) .nargs("?") .required(false) parser.addArgument("--config", "-c") .metavar("CONF|JSON|PROPERTIES")
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-n", "--dry-run") .action(Arguments.storeTrue()) .dest("dry-run") .setDefault(Boolean.FALSE) .help("output the DDL to stdout, don't run it"); subparser.addArgument("-c", "--count") .type(Integer.class) .dest("count") .help("only apply the next N change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
public JobWatchCommand(Subparser parser) { super(parser); parser.help("watch jobs"); jobsArg = parser.addArgument("job") .help("Job reference"); intervalArg = parser.addArgument("--interval") .type(Integer.class) .setDefault(1) .help("polling interval, default 1 second"); prefixesArg = parser.addArgument("hosts") .nargs("*") .help("The hostname prefixes to watch the job on."); exactArg = parser.addArgument("--exact") .action(storeTrue()) .help("Show status of job for every host in hosts"); }
.action(store()) .required(false) .type(String.class) .metavar("TOPIC") .dest("topic") .action(store()) .required(false) .type(String.class) .dest("producerId") .help("The producerId will be used by producer client and encoded in the messages to the topic"); .action(store()) .required(true) .type(String.class) .metavar("HOST1:PORT1[,HOST2:PORT2[...]]") .dest("brokerList") .action(store()) .required(true) .type(String.class) .metavar("HOST:PORT") .dest("zkConnect") .action(store()) .required(false) .type(String.class) .metavar("RECORD_SIZE") .dest("recordSize")
.type(Long.class) .help("Fail rollout if a job takes longer than this to reach RUNNING (seconds)"); .type(Integer.class) .help("Number of hosts to deploy to concurrently"); .type(Long.class) .help("Exit if rolling-update takes longer than the given value (minutes). Note that " + "this will NOT abort the rolling update, it will just cause this command to exit.");
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-n", "--dry-run") .action(Arguments.storeTrue()) .dest("dry-run") .setDefault(Boolean.FALSE) .help("output the DDL to stdout, don't run it"); subparser.addArgument("-c", "--count") .type(Integer.class) .dest("count") .help("only apply the next N change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
.type(Boolean.class) .setDefault(true) .help("enable authentication using access tokens derived from Google Credentials"); .type(Integer.class) .help("Timeout (in seconds) for each HTTP/S request to the master. " + "If this flag is not set, the value in the environment variable " .type(Integer.class) .help("Total timeout (in seconds) for all of the requests that helios makes to the " + "master. If an individual request fails, helios will retry the request again "
.type(Integer.class) .setDefault(10) .help("Number of minutes that this agent must be DOWN (i.e. not periodically check-in with " .type(String.class); .type(String.class) .help("ZooKeeper agent password (for ZooKeeper ACLs). If the " + ZK_AGENT_PASSWORD_ENVVAR .type(Integer.class) .help("Size of the Docker socket connection pool."); .type(fileType().verifyExists().verifyCanRead()) .help("When set, helios-agent will configure the docker-client to use the Google Cloud " + "user or service account whose credentials are contained in the specified file for "
.type(fileType().verifyExists().verifyCanRead()) .help("Service registration plugin."); .type(Integer.class) .setDefault((int) SECONDS.toMillis(60)) .help("zookeeper session timeout"); .type(Integer.class) .setDefault((int) SECONDS.toMillis(15)) .help("zookeeper connection timeout"); .type(String.class) .setDefault((String) null) .help("Optional cluster ID to ensure we are connected to the right cluster"); .type(String.class) .setDefault("helios-master") .help("zookeeper ACL username used for masters."); .type(String.class) .setDefault("helios-agent") .help("zookeeper ACL username used for agents."); .type(fileType().verifyExists().verifyCanRead()) .help("Logback configuration file."); .type(Integer.class) .setDefault(30) .help("Interval in seconds at which to report metrics to FastForward.");
.type(fileType().acceptSystemIn()) .help("Job configuration file. Options specified on the command line will be merged with" + " the contents of this file. Cannot be used together with -t/--template."); .type(Integer.class) .setDefault((Object) null) .help("if --grace-period is specified, Helios will unregister from service discovery and "
@Override public void attachToSubparser(final Subparser subparser) { subparser.addArgument("-d", "--deviceId") .type(int.class) .required(true) .help("Specify the device you want to remove. Use listDevices to see the deviceIds."); }
public static void configureArguments(ArgumentParser parser) { parser.addArgument("-c", "--config-file") .type(File.class) .action(Arguments.append()) .metavar("FILE") .help("use configuration from FILE"); parser.addArgument("-m", "--model-file") .type(File.class) .metavar("FILE") .help("load model from FILE"); }
@Override public void configureArguments(ArgumentParser parser) { ScriptEnvironment.configureArguments(parser); parser.addArgument("config_file") .metavar("CONFIG") .help("Load train-test configuration from CONFIG") .type(File.class) .required(true); }