@ Override public Promise < Void > cleanup ( List < Integer > partitionsToDelete ) { return Promise . ofBlockingCallable ( executor , ( ) -> { for ( Integer partitionToDelete : partitionsToDelete ) { Path path1 = partitionPath ( partitionToDelete ) ; try { Files . delete ( path1 ) ; } catch ( IOException e ) { logger . warn ( "Could not delete {} : {}" , path1 , e . toString ( ) ) ; } } return null ; } ) ; }
Method which removes all creating files