question: private Configuration prepareJobForCancelling ( ) throws Exception { prepareFile ( "/testFile" , 1500 ) ; executedTasks . set ( 0 ) ; cancelledTasks . set ( 0 ) ; failMapperId . set ( 0 ) ; splitsCount . set ( 0 ) ; Configuration cfg = new Configuration ( ) ; setupFileSystems ( cfg ) ; Job job = Job . getInstance ( cfg ) ; job . setOutputKeyClass ( Text . class ) ; job . setOutputValueClass ( IntWritable . class ) ; job . setMapperClass ( CancellingTestMapper . class ) ; job . setNumReduceTasks ( 0 ) ; job . setInputFormatClass ( InFormat . class ) ; FileInputFormat . setInputPaths ( job , new Path ( "igfs://:" + getTestGridName ( 0 ) + "@/" ) ) ; FileOutputFormat . setOutputPath ( job , new Path ( "igfs://:" + getTestGridName ( 0 ) + "@/output/" ) ) ; job . setJarByClass ( getClass ( ) ) ; return job . getConfiguration ( ) ; }
target:  Prepare job with mappers to cancel.