MCPcopy
hub / github.com/OpenTSDB/opentsdb / applyCommandLine

Method applyCommandLine

src/tools/OpenTSDBMain.java:181–200  ·  view source on GitHub ↗

Applies and processes the pre-tsd command line @param cap The main configuration wrapper @param argp The preped command line argument handler

(ConfigArgP cap, ArgP argp)

Source from the content-addressed store, hash-verified

179 * @param argp The preped command line argument handler
180 */
181 protected static void applyCommandLine(ConfigArgP cap, ArgP argp) {
182 // --config, --include-config, --help
183 if(argp.has("--help")) {
184 if(cap.hasNonOption("extended")) {
185 System.out.println(cap.getExtendedUsage("tsd extended usage:"));
186 } else {
187 System.out.println(cap.getDefaultUsage("tsd usage:"));
188 }
189 System.exit(0);
190 }
191 if(argp.has("--config")) {
192 loadConfigSource(cap, argp.get("--config").trim());
193 }
194 if(argp.has("--include")) {
195 String[] sources = argp.get("--include").split(",");
196 for(String s: sources) {
197 loadConfigSource(cap, s.trim());
198 }
199 }
200 }
201
202 /**
203 * Applies the properties from the named source to the main configuration

Callers 1

launchTSDMethod · 0.95

Calls 7

loadConfigSourceMethod · 0.95
hasMethod · 0.80
hasNonOptionMethod · 0.80
getExtendedUsageMethod · 0.80
getDefaultUsageMethod · 0.80
getMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected