private static int runCommand ( final TSDB tsdb , final boolean use_data_table , final String [ ] args ) throws Exception { final int nargs = args . length ; if ( args [ 0 ] . equals ( "lookup" ) ) { if ( nargs < 2 ) { // need a query usage ( null , "Not enough arguments" ) ; return 2 ; } return lookup ( tsdb , use_data_table , args ) ; } else { usage ( null , "Unknown sub command: " + args [ 0 ] ) ; return 2 ; } }
Determines the command requested of the user can calls the appropriate method .