public int run ( String jobName , String [ ] args ) { int status = - 1 ; try { Class < ? extends SimpleJobTool > clazz = jobMap . get ( jobName ) ; if ( clazz == null ) { log . error ( "Tool " + jobName + " class not found." ) ; return status ; } status = ToolRunner . run ( clazz . newInstance ( ) , args ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; log . error ( e ) ; } return status ; }
Run the job .