private static int createWriteDFSPaths ( ) { if ( createDFSPaths ( ) != 0 ) { return - 1 ; } try { // write to all the files! for ( Map . Entry < String , OutputStream > file : files_ . entrySet ( ) ) { OutputStream os = file . getValue ( ) ; long startTime = System . nanoTime ( ) ; os . write ( data_ . getBytes ( ) ) ; timingWrite_ . add ( new Double ( ( System . nanoTime ( ) - startTime ) / ( 1E9 ) ) ) ; os . close ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; return - 1 ; } return 0 ; }
This creates DFS paths and writes data_ to them in one go .