private boolean delete ( String path , boolean recursive ) throws IOException { IOException te = null ; FileSystem hdfs = getFs ( ) ; RetryPolicy retryPolicy = new CountingRetry ( MAX_TRY ) ; while ( retryPolicy . attempt ( ) ) { try { return hdfs . delete ( new Path ( path ) , recursive ) ; } catch ( IOException e ) { LOG . warn ( "Attempt count {} : {}" , retryPolicy . getAttemptCount ( ) , e . getMessage ( ) ) ; te = e ; } } throw te ; }
Delete a file or directory at path .