private boolean rename ( String src , String dst ) throws IOException { IOException te = null ; FileSystem hdfs = getFs ( ) ; RetryPolicy retryPolicy = new CountingRetry ( MAX_TRY ) ; while ( retryPolicy . attempt ( ) ) { try { return hdfs . rename ( new Path ( src ) , new Path ( dst ) ) ; } catch ( IOException e ) { LOG . warn ( "{} try to rename {} to {} : {}" , retryPolicy . getAttemptCount ( ) , src , dst , e . getMessage ( ) ) ; te = e ; } } throw te ; }
Rename a file or folder to a file or folder .