protected void writeInputData ( long genbytes , Path ioPath ) throws IOException , InterruptedException { final Configuration conf = getConf ( ) ; final GridmixJob genData = new GenerateData ( conf , ioPath , genbytes ) ; submitter . add ( genData ) ; LOG . info ( "Generating " + StringUtils . humanReadableInt ( genbytes ) + " of test data..." ) ; // TODO add listeners, use for job dependencies TimeUnit . SECONDS . sleep ( 10 ) ; try { genData . getJob ( ) . waitForCompletion ( false ) ; } catch ( ClassNotFoundException e ) { throw new IOException ( "Internal error" , e ) ; } if ( ! genData . getJob ( ) . isSuccessful ( ) ) { throw new IOException ( "Data generation failed!" ) ; } LOG . info ( "Done." ) ; }
Write random bytes at the path provided .