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

Method process

src/tools/OpenTSDBMain.java:159–173  ·  view source on GitHub ↗

Executes the target tool @param targetTool the name of the target tool to execute @param args The command line arguments minus the tool name

(String targetTool, String[] args)

Source from the content-addressed store, hash-verified

157 * @param args The command line arguments minus the tool name
158 */
159 private static void process(String targetTool, String[] args) {
160 if("mkmetric".equals(targetTool)) {
161 shift(args);
162 }
163 if(!"tsd".equals(targetTool)) {
164 try {
165 COMMANDS.get(targetTool).getDeclaredMethod("main", String[].class).invoke(null, new Object[] {args});
166 } catch(Exception x) {
167 log.error("Failed to call [" + targetTool + "].", x);
168 System.exit(-1);
169 }
170 } else {
171 launchTSD(args);
172 }
173 }
174
175
176 /**

Callers 1

mainMethod · 0.95

Calls 5

shiftMethod · 0.95
launchTSDMethod · 0.95
errorMethod · 0.80
equalsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected