List of usage examples for org.apache.commons.cli OptionGroup OptionGroup
OptionGroup
From source file:org.apache.falcon.cli.FalconCLI.java
private Options createAdminOptions() { Options adminOptions = new Options(); Option url = new Option(URL_OPTION, true, "Falcon URL"); adminOptions.addOption(url);/*from ww w. java 2s.c o m*/ OptionGroup group = new OptionGroup(); Option status = new Option(STATUS_OPTION, false, "show the current system status"); Option version = new Option(VERSION_OPTION, false, "show Falcon server build version"); Option stack = new Option(STACK_OPTION, false, "show the thread stack dump"); Option doAs = new Option(DO_AS_OPT, true, "doAs user"); Option help = new Option("help", false, "show Falcon help"); group.addOption(status); group.addOption(version); group.addOption(stack); group.addOption(help); adminOptions.addOptionGroup(group); adminOptions.addOption(doAs); return adminOptions; }
From source file:org.apache.falcon.cli.FalconCLI.java
private Options entityOptions() { Options entityOptions = new Options(); Option submit = new Option(SUBMIT_OPT, false, "Submits an entity xml to Falcon"); Option update = new Option(UPDATE_OPT, false, "Updates an existing entity xml"); Option schedule = new Option(SCHEDULE_OPT, false, "Schedules a submited entity in Falcon"); Option suspend = new Option(SUSPEND_OPT, false, "Suspends a running entity in Falcon"); Option resume = new Option(RESUME_OPT, false, "Resumes a suspended entity in Falcon"); Option delete = new Option(DELETE_OPT, false, "Deletes an entity in Falcon, and kills its instance from workflow engine"); Option submitAndSchedule = new Option(SUBMIT_AND_SCHEDULE_OPT, false, "Submits and entity to Falcon and schedules it immediately"); Option validate = new Option(VALIDATE_OPT, false, "Validates an entity based on the entity type"); Option status = new Option(STATUS_OPT, false, "Gets the status of entity"); Option definition = new Option(DEFINITION_OPT, false, "Gets the Definition of entity"); Option dependency = new Option(DEPENDENCY_OPT, false, "Gets the dependencies of entity"); Option list = new Option(LIST_OPT, false, "List entities registered for a type"); Option lookup = new Option(LOOKUP_OPT, false, "Lookup a feed given its instance's path"); Option entitySummary = new Option(SUMMARY_OPT, false, "Get summary of instances for list of entities"); Option touch = new Option(TOUCH_OPT, false, "Force update the entity in workflow engine(even without any changes to entity)"); OptionGroup group = new OptionGroup(); group.addOption(submit);/*from w w w . j a v a2s. com*/ group.addOption(update); group.addOption(schedule); group.addOption(suspend); group.addOption(resume); group.addOption(delete); group.addOption(submitAndSchedule); group.addOption(validate); group.addOption(status); group.addOption(definition); group.addOption(dependency); group.addOption(list); group.addOption(lookup); group.addOption(entitySummary); group.addOption(touch); Option url = new Option(URL_OPTION, true, "Falcon URL"); Option entityType = new Option(ENTITY_TYPE_OPT, true, "Entity type, can be cluster, feed or process xml"); Option filePath = new Option(FILE_PATH_OPT, true, "Path to entity xml file"); Option entityName = new Option(ENTITY_NAME_OPT, true, "Entity type, can be cluster, feed or process xml"); Option start = new Option(START_OPT, true, "Start time is optional for summary"); Option end = new Option(END_OPT, true, "End time is optional for summary"); Option colo = new Option(COLO_OPT, true, "Colo name"); Option cluster = new Option(CLUSTER_OPT, true, "Cluster name"); colo.setRequired(false); Option fields = new Option(FIELDS_OPT, true, "Entity fields to show for a request"); Option filterBy = new Option(FILTER_BY_OPT, true, "Filter returned entities by the specified status"); Option filterTags = new Option(TAGS_OPT, true, "Filter returned entities by the specified tags"); Option nameSubsequence = new Option(NAMESEQ_OPT, true, "Subsequence of entity name"); Option tagKeywords = new Option(TAGKEYS_OPT, true, "Keywords in tags"); Option orderBy = new Option(ORDER_BY_OPT, true, "Order returned entities by this field"); Option sortOrder = new Option(SORT_ORDER_OPT, true, "asc or desc order for results"); Option offset = new Option(OFFSET_OPT, true, "Start returning entities from this offset"); Option numResults = new Option(NUM_RESULTS_OPT, true, "Number of results to return per request"); Option numInstances = new Option(NUM_INSTANCES_OPT, true, "Number of instances to return per entity summary request"); Option path = new Option(PATH_OPT, true, "Path for a feed's instance"); Option skipDryRun = new Option(SKIPDRYRUN_OPT, false, "skip dry run in workflow engine"); Option doAs = new Option(DO_AS_OPT, true, "doAs user"); entityOptions.addOption(url); entityOptions.addOption(path); entityOptions.addOptionGroup(group); entityOptions.addOption(entityType); entityOptions.addOption(entityName); entityOptions.addOption(filePath); entityOptions.addOption(colo); entityOptions.addOption(cluster); entityOptions.addOption(start); entityOptions.addOption(end); entityOptions.addOption(fields); entityOptions.addOption(filterBy); entityOptions.addOption(filterTags); entityOptions.addOption(nameSubsequence); entityOptions.addOption(tagKeywords); entityOptions.addOption(orderBy); entityOptions.addOption(sortOrder); entityOptions.addOption(offset); entityOptions.addOption(numResults); entityOptions.addOption(numInstances); entityOptions.addOption(skipDryRun); entityOptions.addOption(doAs); return entityOptions; }
From source file:org.apache.falcon.cli.FalconCLI.java
private Options instanceOptions() { Options instanceOptions = new Options(); Option running = new Option(RUNNING_OPT, false, "Gets running process instances for a given process"); Option list = new Option(LIST_OPT, false, "Gets all instances for a given process in the range start time and optional end time"); Option status = new Option(STATUS_OPT, false, "Gets status of process instances for a given process in the range start time and optional end time"); Option summary = new Option(SUMMARY_OPT, false, "Gets summary of instances for a given process in the range start time and optional end time"); Option kill = new Option(KILL_OPT, false, "Kills active process instances for a given process in the range start time and optional end time"); Option suspend = new Option(SUSPEND_OPT, false, "Suspends active process instances for a given process in the range start time and optional end time"); Option resume = new Option(RESUME_OPT, false, "Resumes suspended process instances for a given process " + "in the range start time and optional end time"); Option rerun = new Option(RERUN_OPT, false, "Reruns process instances for a given process in the range start time and " + "optional end time and overrides properties present in job.properties file"); Option logs = new Option(LOG_OPT, false, "Logs print the logs for process instances for a given process in " + "the range start time and optional end time"); Option params = new Option(PARARMS_OPT, false, "Displays the workflow parameters for a given instance of specified nominal time" + "start time represents nominal time and end time is not considered"); Option listing = new Option(LISTING_OPT, false, "Displays feed listing and their status between a start and end time range."); Option dependency = new Option(DEPENDENCY_OPT, false, "Displays dependent instances for a specified instance."); Option triage = new Option(TRIAGE_OPT, false, "Triage a feed or process instance and find the failures in it's lineage."); OptionGroup group = new OptionGroup(); group.addOption(running);/*from ww w . j a va2s.c o m*/ group.addOption(list); group.addOption(status); group.addOption(summary); group.addOption(kill); group.addOption(resume); group.addOption(suspend); group.addOption(resume); group.addOption(rerun); group.addOption(logs); group.addOption(params); group.addOption(listing); group.addOption(dependency); group.addOption(triage); Option url = new Option(URL_OPTION, true, "Falcon URL"); Option start = new Option(START_OPT, true, "Start time is required for commands, status, kill, suspend, resume and re-run" + "and it is nominal time while displaying workflow params"); Option end = new Option(END_OPT, true, "End time is optional for commands, status, kill, suspend, resume and re-run; " + "if not specified then current time is considered as end time"); Option runid = new Option(RUNID_OPT, true, "Instance runid is optional and user can specify the runid, defaults to 0"); Option clusters = new Option(CLUSTERS_OPT, true, "clusters is optional for commands kill, suspend and resume, " + "should not be specified for other commands"); Option sourceClusters = new Option(SOURCECLUSTER_OPT, true, " source cluster is optional for commands kill, suspend and resume, " + "should not be specified for other commands (required for only feed)"); Option filePath = new Option(FILE_PATH_OPT, true, "Path to job.properties file is required for rerun command, " + "it should contain name=value pair for properties to override for rerun"); Option entityType = new Option(ENTITY_TYPE_OPT, true, "Entity type, can be feed or process xml"); Option entityName = new Option(ENTITY_NAME_OPT, true, "Entity name, can be feed or process name"); Option colo = new Option(COLO_OPT, true, "Colo on which the cmd has to be executed"); Option lifecycle = new Option(LIFECYCLE_OPT, true, "describes life cycle of entity , for feed it can be replication/retention " + "and for process it can be execution"); Option filterBy = new Option(FILTER_BY_OPT, true, "Filter returned instances by the specified fields"); Option orderBy = new Option(ORDER_BY_OPT, true, "Order returned instances by this field"); Option sortOrder = new Option(SORT_ORDER_OPT, true, "asc or desc order for results"); Option offset = new Option(OFFSET_OPT, true, "Start returning instances from this offset"); Option numResults = new Option(NUM_RESULTS_OPT, true, "Number of results to return per request"); Option forceRerun = new Option(FORCE_RERUN_FLAG, false, "Flag to forcefully rerun entire workflow of an instance"); Option doAs = new Option(DO_AS_OPT, true, "doAs user"); Option instanceTime = new Option(INSTANCE_TIME_OPT, true, "Time for an instance"); instanceOptions.addOption(url); instanceOptions.addOptionGroup(group); instanceOptions.addOption(start); instanceOptions.addOption(end); instanceOptions.addOption(filePath); instanceOptions.addOption(entityType); instanceOptions.addOption(entityName); instanceOptions.addOption(runid); instanceOptions.addOption(clusters); instanceOptions.addOption(sourceClusters); instanceOptions.addOption(colo); instanceOptions.addOption(lifecycle); instanceOptions.addOption(filterBy); instanceOptions.addOption(offset); instanceOptions.addOption(orderBy); instanceOptions.addOption(sortOrder); instanceOptions.addOption(numResults); instanceOptions.addOption(forceRerun); instanceOptions.addOption(doAs); instanceOptions.addOption(instanceTime); return instanceOptions; }
From source file:org.apache.falcon.cli.FalconEntityCLI.java
public Options createEntityOptions() { Options entityOptions = new Options(); Option submit = new Option(SUBMIT_OPT, false, "Submits an entity xml to Falcon"); Option update = new Option(UPDATE_OPT, false, "Updates an existing entity xml"); Option schedule = new Option(SCHEDULE_OPT, false, "Schedules a submited entity in Falcon"); Option suspend = new Option(SUSPEND_OPT, false, "Suspends a running entity in Falcon"); Option resume = new Option(RESUME_OPT, false, "Resumes a suspended entity in Falcon"); Option delete = new Option(DELETE_OPT, false, "Deletes an entity in Falcon, and kills its instance from workflow engine"); Option submitAndSchedule = new Option(SUBMIT_AND_SCHEDULE_OPT, false, "Submits and entity to Falcon and schedules it immediately"); Option validate = new Option(VALIDATE_OPT, false, "Validates an entity based on the entity type"); Option status = new Option(STATUS_OPT, false, "Gets the status of entity"); Option definition = new Option(DEFINITION_OPT, false, "Gets the Definition of entity"); Option dependency = new Option(DEPENDENCY_OPT, false, "Gets the dependencies of entity"); Option list = new Option(LIST_OPT, false, "List entities registered for a type"); Option lookup = new Option(LOOKUP_OPT, false, "Lookup a feed given its instance's path"); Option slaAlert = new Option(SLA_MISS_ALERT_OPT, false, "Get missing feed instances which missed SLA"); Option entitySummary = new Option(SUMMARY_OPT, false, "Get summary of instances for list of entities"); Option touch = new Option(TOUCH_OPT, false, "Force update the entity in workflow engine(even without any changes to entity)"); OptionGroup group = new OptionGroup(); group.addOption(submit);/*from w ww.ja v a 2 s . c o m*/ group.addOption(update); group.addOption(schedule); group.addOption(suspend); group.addOption(resume); group.addOption(delete); group.addOption(submitAndSchedule); group.addOption(validate); group.addOption(status); group.addOption(definition); group.addOption(dependency); group.addOption(list); group.addOption(lookup); group.addOption(slaAlert); group.addOption(entitySummary); group.addOption(touch); Option url = new Option(URL_OPTION, true, "Falcon URL"); Option entityType = new Option(TYPE_OPT, true, "Entity type, can be cluster, feed or process xml"); Option filePath = new Option(FILE_PATH_OPT, true, "Path to entity xml file"); Option entityName = new Option(ENTITY_NAME_OPT, true, "Entity type, can be cluster, feed or process xml"); Option start = new Option(START_OPT, true, "Start time is optional for summary"); Option end = new Option(END_OPT, true, "End time is optional for summary"); Option colo = new Option(COLO_OPT, true, "Colo name"); Option cluster = new Option(CLUSTER_OPT, true, "Cluster name"); colo.setRequired(false); Option fields = new Option(FIELDS_OPT, true, "Entity fields to show for a request"); Option filterBy = new Option(FILTER_BY_OPT, true, "Filter returned entities by the specified status"); Option filterTags = new Option(TAGS_OPT, true, "Filter returned entities by the specified tags"); Option nameSubsequence = new Option(NAMESEQ_OPT, true, "Subsequence of entity name"); Option tagKeywords = new Option(TAGKEYS_OPT, true, "Keywords in tags"); Option orderBy = new Option(ORDER_BY_OPT, true, "Order returned entities by this field"); Option sortOrder = new Option(SORT_ORDER_OPT, true, "asc or desc order for results"); Option offset = new Option(OFFSET_OPT, true, "Start returning entities from this offset"); Option numResults = new Option(NUM_RESULTS_OPT, true, "Number of results to return per request"); Option numInstances = new Option(NUM_INSTANCES_OPT, true, "Number of instances to return per entity summary request"); Option path = new Option(PATH_OPT, true, "Path for a feed's instance"); Option skipDryRun = new Option(SKIPDRYRUN_OPT, false, "skip dry run in workflow engine"); Option doAs = new Option(DO_AS_OPT, true, "doAs user"); Option userProps = new Option(PROPS_OPT, true, "User supplied comma separated key value properties"); Option debug = new Option(DEBUG_OPTION, false, "Use debug mode to see debugging statements on stdout"); entityOptions.addOption(url); entityOptions.addOption(path); entityOptions.addOptionGroup(group); entityOptions.addOption(entityType); entityOptions.addOption(entityName); entityOptions.addOption(filePath); entityOptions.addOption(colo); entityOptions.addOption(cluster); entityOptions.addOption(start); entityOptions.addOption(end); entityOptions.addOption(fields); entityOptions.addOption(filterBy); entityOptions.addOption(filterTags); entityOptions.addOption(nameSubsequence); entityOptions.addOption(tagKeywords); entityOptions.addOption(orderBy); entityOptions.addOption(sortOrder); entityOptions.addOption(offset); entityOptions.addOption(numResults); entityOptions.addOption(numInstances); entityOptions.addOption(skipDryRun); entityOptions.addOption(doAs); entityOptions.addOption(userProps); entityOptions.addOption(debug); return entityOptions; }
From source file:org.apache.falcon.cli.FalconExtensionCLI.java
public Options createExtensionOptions() { Options extensionOptions = new Options(); Option enumerate = new Option(ENUMERATE_OPT, false, "Enumerate all extensions"); Option definition = new Option(DEFINITION_OPT, false, "Get extension definition"); Option describe = new Option(DESCRIBE_OPT, false, "Get extension description"); Option list = new Option(FalconCLIConstants.LIST_OPT, false, "List extension jobs and associated entities"); Option instances = new Option(INSTANCES_OPT, false, "List instances of an extension job"); Option submit = new Option(FalconCLIConstants.SUBMIT_OPT, false, "Submit an extension job"); Option submitAndSchedule = new Option(FalconCLIConstants.SUBMIT_AND_SCHEDULE_OPT, false, "Submit and schedule an extension job"); Option update = new Option(FalconCLIConstants.UPDATE_OPT, false, "Update an extension job"); Option validate = new Option(FalconCLIConstants.VALIDATE_OPT, false, "Validate an extension job"); Option schedule = new Option(FalconCLIConstants.SCHEDULE_OPT, false, "Schedule an extension job"); Option suspend = new Option(FalconCLIConstants.SUSPEND_OPT, false, "Suspend an extension job"); Option resume = new Option(FalconCLIConstants.RESUME_OPT, false, "Resume an extension job"); Option delete = new Option(FalconCLIConstants.DELETE_OPT, false, "Delete an extension job"); OptionGroup group = new OptionGroup(); group.addOption(enumerate);//from w w w . j av a2 s. c o m group.addOption(definition); group.addOption(describe); group.addOption(list); group.addOption(instances); group.addOption(submit); group.addOption(submitAndSchedule); group.addOption(update); group.addOption(validate); group.addOption(schedule); group.addOption(suspend); group.addOption(resume); group.addOption(delete); extensionOptions.addOptionGroup(group); Option url = new Option(FalconCLIConstants.URL_OPTION, true, "Falcon URL"); Option doAs = new Option(FalconCLIConstants.DO_AS_OPT, true, "doAs user"); Option debug = new Option(FalconCLIConstants.DEBUG_OPTION, false, "Use debug mode to see debugging statements on stdout"); Option extensionName = new Option(ENTENSION_NAME_OPT, true, "Extension name"); Option jobName = new Option(JOB_NAME_OPT, true, "Extension job name"); Option instanceStatus = new Option(FalconCLIConstants.INSTANCE_STATUS_OPT, true, "Instance status"); Option sortOrder = new Option(FalconCLIConstants.SORT_ORDER_OPT, true, "asc or desc order for results"); Option offset = new Option(FalconCLIConstants.OFFSET_OPT, true, "Start returning instances from this offset"); Option numResults = new Option(FalconCLIConstants.NUM_RESULTS_OPT, true, "Number of results to return per request"); Option fields = new Option(FalconCLIConstants.FIELDS_OPT, true, "Entity fields to show for a request"); Option start = new Option(FalconCLIConstants.START_OPT, true, "Start time of instances"); Option end = new Option(FalconCLIConstants.END_OPT, true, "End time of instances"); Option status = new Option(FalconCLIConstants.STATUS_OPT, true, "Filter returned instances by status"); Option orderBy = new Option(FalconCLIConstants.ORDER_BY_OPT, true, "Order returned instances by this field"); Option filePath = new Option(FalconCLIConstants.FILE_PATH_OPT, true, "File path of extension parameters"); extensionOptions.addOption(url); extensionOptions.addOption(doAs); extensionOptions.addOption(debug); extensionOptions.addOption(extensionName); extensionOptions.addOption(jobName); extensionOptions.addOption(instanceStatus); extensionOptions.addOption(sortOrder); extensionOptions.addOption(offset); extensionOptions.addOption(numResults); extensionOptions.addOption(fields); extensionOptions.addOption(start); extensionOptions.addOption(end); extensionOptions.addOption(status); extensionOptions.addOption(orderBy); extensionOptions.addOption(filePath); return extensionOptions; }
From source file:org.apache.falcon.cli.FalconInstanceCLI.java
public Options createInstanceOptions() { Options instanceOptions = new Options(); Option running = new Option(RUNNING_OPT, false, "Gets running process instances for a given process"); Option list = new Option(LIST_OPT, false, "Gets all instances for a given process in the range start time and optional end time"); Option status = new Option(STATUS_OPT, false, "Gets status of process instances for a given process in the range start time and optional end time"); Option summary = new Option(SUMMARY_OPT, false, "Gets summary of instances for a given process in the range start time and optional end time"); Option kill = new Option(KILL_OPT, false, "Kills active process instances for a given process in the range start time and optional end time"); Option suspend = new Option(SUSPEND_OPT, false, "Suspends active process instances for a given process in the range start time and optional end time"); Option resume = new Option(RESUME_OPT, false, "Resumes suspended process instances for a given process " + "in the range start time and optional end time"); Option rerun = new Option(RERUN_OPT, false, "Reruns process instances for a given process in the range start time and " + "optional end time and overrides properties present in job.properties file"); Option logs = new Option(LOG_OPT, false, "Logs print the logs for process instances for a given process in " + "the range start time and optional end time"); Option params = new Option(PARARMS_OPT, false, "Displays the workflow parameters for a given instance of specified nominal time" + "start time represents nominal time and end time is not considered"); Option listing = new Option(LISTING_OPT, false, "Displays feed listing and their status between a start and end time range."); Option dependency = new Option(DEPENDENCY_OPT, false, "Displays dependent instances for a specified instance."); Option triage = new Option(TRIAGE_OPT, false, "Triage a feed or process instance and find the failures in it's lineage."); OptionGroup group = new OptionGroup(); group.addOption(running);/*from ww w . j av a2 s . c om*/ group.addOption(list); group.addOption(status); group.addOption(summary); group.addOption(kill); group.addOption(resume); group.addOption(suspend); group.addOption(resume); group.addOption(rerun); group.addOption(logs); group.addOption(params); group.addOption(listing); group.addOption(dependency); group.addOption(triage); Option url = new Option(URL_OPTION, true, "Falcon URL"); Option start = new Option(START_OPT, true, "Start time is required for commands, status, kill, suspend, resume and re-run" + "and it is nominal time while displaying workflow params"); Option end = new Option(END_OPT, true, "End time is optional for commands, status, kill, suspend, resume and re-run; " + "if not specified then current time is considered as end time"); Option runid = new Option(RUNID_OPT, true, "Instance runid is optional and user can specify the runid, defaults to 0"); Option clusters = new Option(CLUSTERS_OPT, true, "clusters is optional for commands kill, suspend and resume, " + "should not be specified for other commands"); Option sourceClusters = new Option(SOURCECLUSTER_OPT, true, " source cluster is optional for commands kill, suspend and resume, " + "should not be specified for other commands (required for only feed)"); Option filePath = new Option(FILE_PATH_OPT, true, "Path to job.properties file is required for rerun command, " + "it should contain name=value pair for properties to override for rerun"); Option entityType = new Option(TYPE_OPT, true, "Entity type, can be feed or process xml"); Option entityName = new Option(ENTITY_NAME_OPT, true, "Entity name, can be feed or process name"); Option colo = new Option(COLO_OPT, true, "Colo on which the cmd has to be executed"); Option lifecycle = new Option(LIFECYCLE_OPT, true, "describes life cycle of entity , for feed it can be replication/retention " + "and for process it can be execution"); Option filterBy = new Option(FILTER_BY_OPT, true, "Filter returned instances by the specified fields"); Option orderBy = new Option(ORDER_BY_OPT, true, "Order returned instances by this field"); Option sortOrder = new Option(SORT_ORDER_OPT, true, "asc or desc order for results"); Option offset = new Option(OFFSET_OPT, true, "Start returning instances from this offset"); Option numResults = new Option(NUM_RESULTS_OPT, true, "Number of results to return per request"); Option forceRerun = new Option(FORCE_RERUN_FLAG, false, "Flag to forcefully rerun entire workflow of an instance"); Option doAs = new Option(DO_AS_OPT, true, "doAs user"); Option debug = new Option(DEBUG_OPTION, false, "Use debug mode to see debugging statements on stdout"); Option instanceTime = new Option(INSTANCE_TIME_OPT, true, "Time for an instance"); instanceOptions.addOption(url); instanceOptions.addOptionGroup(group); instanceOptions.addOption(start); instanceOptions.addOption(end); instanceOptions.addOption(filePath); instanceOptions.addOption(entityType); instanceOptions.addOption(entityName); instanceOptions.addOption(runid); instanceOptions.addOption(clusters); instanceOptions.addOption(sourceClusters); instanceOptions.addOption(colo); instanceOptions.addOption(lifecycle); instanceOptions.addOption(filterBy); instanceOptions.addOption(offset); instanceOptions.addOption(orderBy); instanceOptions.addOption(sortOrder); instanceOptions.addOption(numResults); instanceOptions.addOption(forceRerun); instanceOptions.addOption(doAs); instanceOptions.addOption(debug); instanceOptions.addOption(instanceTime); return instanceOptions; }
From source file:org.apache.falcon.cli.FalconMetadataCLI.java
public Options createMetadataOptions() { Options metadataOptions = new Options(); OptionGroup group = new OptionGroup(); Option discovery = new Option(DISCOVERY_OPT, false, "Discover falcon metadata relations"); Option lineage = new Option(LINEAGE_OPT, false, "Get falcon metadata lineage information"); group.addOption(discovery);/*from w w w. j a v a 2 s . c om*/ group.addOption(lineage); Option pipeline = new Option(PIPELINE_OPT, true, "Get lineage graph for the entities in a pipeline"); metadataOptions.addOptionGroup(group); // Add discovery options Option list = new Option(LIST_OPT, false, "List all dimensions"); Option relations = new Option(RELATIONS_OPT, false, "List all relations for a dimension"); metadataOptions.addOption(list); metadataOptions.addOption(relations); Option url = new Option(URL_OPTION, true, "Falcon URL"); Option type = new Option(TYPE_OPT, true, "Dimension type"); Option name = new Option(NAME_OPT, true, "Dimension name"); Option cluster = new Option(CLUSTER_OPT, true, "Cluster name"); // Add lineage options metadataOptions.addOption(pipeline); metadataOptions.addOption(url); metadataOptions.addOption(type); metadataOptions.addOption(cluster); metadataOptions.addOption(name); Option vertex = new Option(VERTEX_CMD, false, "show the vertices"); Option vertices = new Option(VERTICES_CMD, false, "show the vertices"); Option vertexEdges = new Option(VERTEX_EDGES_CMD, false, "show the edges for a given vertex"); Option edges = new Option(EDGE_CMD, false, "show the edges"); Option id = new Option(ID_OPT, true, "vertex or edge id"); Option key = new Option(KEY_OPT, true, "key property"); Option value = new Option(VALUE_OPT, true, "value property"); Option direction = new Option(DIRECTION_OPT, true, "edge direction property"); metadataOptions.addOption(vertex); metadataOptions.addOption(vertices); metadataOptions.addOption(vertexEdges); metadataOptions.addOption(edges); metadataOptions.addOption(id); metadataOptions.addOption(key); metadataOptions.addOption(value); metadataOptions.addOption(direction); Option doAs = new Option(FalconCLI.DO_AS_OPT, true, "doAs user"); metadataOptions.addOption(doAs); return metadataOptions; }
From source file:org.apache.geronimo.cli.BaseCLParser.java
protected void addVerboseOptions() { OptionGroup optionGroup = new OptionGroup(); Option option = new Option(ARGUMENT_VERBOSE_INFO_SHORTFORM, ARGUMENT_VERBOSE_INFO, false, "Reduces the console log level to INFO, resulting in more console output than is normally present."); optionGroup.addOption(option);// w w w . j a va 2s. co m option = new Option(ARGUMENT_VERBOSE_DEBUG_SHORTFORM, ARGUMENT_VERBOSE_DEBUG, false, "Reduces the console log level to DEBUG, resulting in still more console output."); optionGroup.addOption(option); option = new Option(ARGUMENT_VERBOSE_TRACE_SHORTFORM, ARGUMENT_VERBOSE_TRACE, false, "Reduces the console log level to TRACE, resulting in still more console output."); optionGroup.addOption(option); options.addOptionGroup(optionGroup); }
From source file:org.apache.geronimo.cli.daemon.DaemonCLParser.java
protected void addProgressOptions() { OptionGroup optionGroup = new OptionGroup(); Option option = new Option(ARGUMENT_NO_PROGRESS_SHORTFORM, ARGUMENT_NO_PROGRESS, false, "Suppress the normal startup progress bar. This is typically " + "used when redirecting console output to a file, or starting " + "the server from an IDE or other tool."); optionGroup.addOption(option);/*from w w w . j a va 2 s .c om*/ option = new Option(ARGUMENT_LONG_PROGRESS_SHORTFORM, ARGUMENT_LONG_PROGRESS, false, "Write startup progress to the console in a format that is " + "suitable for redirecting console output to a file, or starting " + "the server from an IDE or other tool (doesn't use linefeeds to " + "update the progress information that is used by default if you " + "don't specify " + ARGUMENT_NO_PROGRESS + " or " + ARGUMENT_LONG_PROGRESS + ")."); optionGroup.addOption(option); options.addOptionGroup(optionGroup); }
From source file:org.apache.geronimo.cli.deployer.ListModulesCommandArgsImpl.java
protected void addState() { OptionGroup optionGroup = new OptionGroup(); Option option = new Option(ARGUMENT_ALL_SHORTFORM, ARGUMENT_ALL, false, "All modules will be listed."); optionGroup.addOption(option);/* w ww. ja va 2s .com*/ option = new Option(ARGUMENT_STARTED_SHORTFORM, ARGUMENT_STARTED, false, "Only started modules will be listed."); optionGroup.addOption(option); option = new Option(ARGUMENT_STOPPED_SHORTFORM, ARGUMENT_STOPPED, false, "Only stopped modules will be listed."); optionGroup.addOption(option); options.addOptionGroup(optionGroup); }