use of org.apache.commons.cli.Option in project heron by twitter.
the class SchedulerMain method constructOptions.
// Construct all required command line options
private static Options constructOptions() {
Options options = new Options();
Option cluster = Option.builder("c").desc("Cluster name in which the topology needs to run on").longOpt("cluster").hasArgs().argName("cluster").required().build();
Option role = Option.builder("r").desc("Role under which the topology needs to run").longOpt("role").hasArgs().argName("role").required().build();
Option environment = Option.builder("e").desc("Environment under which the topology needs to run").longOpt("environment").hasArgs().argName("environment").required().build();
Option topologyName = Option.builder("n").desc("Name of the topology").longOpt("topology_name").hasArgs().argName("topology name").required().build();
Option topologyJar = Option.builder("f").desc("Topology jar/pex file path").longOpt("topology_bin").hasArgs().argName("topology binary file").required().build();
Option schedulerHTTPPort = Option.builder("p").desc("Http Port number on which the scheduler listens for requests").longOpt("http_port").hasArgs().argName("http port").required().build();
Option property = Option.builder(SchedulerUtils.SCHEDULER_COMMAND_LINE_PROPERTIES_OVERRIDE_OPTION).desc("use value for given property").longOpt("property_override").hasArgs().valueSeparator().argName("property=value").build();
Option verbose = Option.builder("v").desc("Enable debug logs").longOpt("verbose").build();
options.addOption(cluster);
options.addOption(role);
options.addOption(environment);
options.addOption(topologyName);
options.addOption(topologyJar);
options.addOption(schedulerHTTPPort);
options.addOption(property);
options.addOption(verbose);
return options;
}
use of org.apache.commons.cli.Option in project heron by twitter.
the class SubmitterMain method constructOptions.
// Construct all required command line options
private static Options constructOptions() {
Options options = new Options();
Option cluster = Option.builder("c").desc("Cluster name in which the topology needs to run on").longOpt("cluster").hasArgs().argName("cluster").required().build();
Option role = Option.builder("r").desc("Role under which the topology needs to run").longOpt("role").hasArgs().argName("role").required().build();
Option environment = Option.builder("e").desc("Environment under which the topology needs to run").longOpt("environment").hasArgs().argName("environment").required().build();
Option heronHome = Option.builder("d").desc("Directory where heron is installed").longOpt("heron_home").hasArgs().argName("heron home dir").required().build();
Option configFile = Option.builder("p").desc("Path of the config files").longOpt("config_path").hasArgs().argName("config path").required().build();
Option configOverrides = Option.builder("o").desc("Command line override config path").longOpt("override_config_file").hasArgs().argName("override config file").build();
Option releaseFile = Option.builder("b").desc("Release file name").longOpt("release_file").hasArgs().argName("release information").build();
Option topologyPackage = Option.builder("y").desc("tar ball containing user submitted jar/tar, defn and config").longOpt("topology_package").hasArgs().argName("topology package").required().build();
Option topologyDefn = Option.builder("f").desc("serialized file containing Topology protobuf").longOpt("topology_defn").hasArgs().argName("topology definition").required().build();
Option topologyJar = Option.builder("j").desc("user heron topology jar/pex file path").longOpt("topology_bin").hasArgs().argName("topology binary file").required().build();
Option dryRun = Option.builder("u").desc("run in dry-run mode").longOpt("dry_run").required(false).build();
Option dryRunFormat = Option.builder("t").desc("dry-run format").longOpt("dry_run_format").hasArg().required(false).build();
Option verbose = Option.builder("v").desc("Enable debug logs").longOpt("verbose").build();
options.addOption(cluster);
options.addOption(role);
options.addOption(environment);
options.addOption(heronHome);
options.addOption(configFile);
options.addOption(configOverrides);
options.addOption(releaseFile);
options.addOption(topologyPackage);
options.addOption(topologyDefn);
options.addOption(topologyJar);
options.addOption(dryRun);
options.addOption(dryRunFormat);
options.addOption(verbose);
return options;
}
use of org.apache.commons.cli.Option in project heron by twitter.
the class RuntimeManagerMain method constructOptions.
// Construct all required command line options
private static Options constructOptions() {
Options options = new Options();
Option cluster = Option.builder("c").desc("Cluster name in which the topology needs to run on").longOpt("cluster").hasArgs().argName("cluster").required().build();
Option role = Option.builder("r").desc("Role under which the topology needs to run").longOpt("role").hasArgs().argName("role").required().build();
Option environment = Option.builder("e").desc("Environment under which the topology needs to run").longOpt("environment").hasArgs().argName("environment").required().build();
Option topologyName = Option.builder("n").desc("Name of the topology").longOpt("topology_name").hasArgs().argName("topology name").required().build();
Option heronHome = Option.builder("d").desc("Directory where heron is installed").longOpt("heron_home").hasArgs().argName("heron home dir").required().build();
Option componentParallelism = Option.builder("a").desc("Component parallelism to update: <name>:<value>,<name>:<value>,...").longOpt("component_parallelism").hasArgs().argName("component parallelism").build();
Option configFile = Option.builder("p").desc("Path of the config files").longOpt("config_path").hasArgs().argName("config path").required().build();
Option configOverrides = Option.builder("o").desc("Command line override config path").longOpt("override_config_file").hasArgs().argName("override config file").build();
Option releaseFile = Option.builder("b").desc("Release file name").longOpt("release_file").hasArgs().argName("release information").build();
Option command = Option.builder("m").desc("Command to run").longOpt("command").hasArgs().required().argName("command to run").build();
Option containerId = Option.builder("i").desc("Container Id for restart command").longOpt("container_id").hasArgs().argName("container id").build();
Option dryRun = Option.builder("u").desc("run in dry-run mode").longOpt("dry_run").required(false).build();
Option dryRunFormat = Option.builder("t").desc("dry-run format").longOpt("dry_run_format").hasArg().required(false).build();
Option verbose = Option.builder("v").desc("Enable debug logs").longOpt("verbose").build();
options.addOption(cluster);
options.addOption(role);
options.addOption(environment);
options.addOption(topologyName);
options.addOption(configFile);
options.addOption(configOverrides);
options.addOption(releaseFile);
options.addOption(command);
options.addOption(heronHome);
options.addOption(containerId);
options.addOption(componentParallelism);
options.addOption(dryRun);
options.addOption(dryRunFormat);
options.addOption(verbose);
return options;
}
use of org.apache.commons.cli.Option in project heron by twitter.
the class RuntimeManagerMain method constructHelpOptions.
// construct command line help options
private static Options constructHelpOptions() {
Options options = new Options();
Option help = Option.builder("h").desc("List all options and their description").longOpt("help").build();
options.addOption(help);
return options;
}
use of org.apache.commons.cli.Option in project heron by twitter.
the class MetricsCacheManager method constructHelpOptions.
// construct command line help options
private static Options constructHelpOptions() {
Options options = new Options();
Option help = Option.builder("h").desc("List all options and their description").longOpt("help").build();
options.addOption(help);
return options;
}
Aggregations