@ Override public boolean undelete ( Path f , String userName ) throws IOException { List < Codec > codecList = Codec . getCodecs ( ) ; Path [ ] parityPathList = new Path [ codecList . size ( ) ] ; for ( int i = 0 ; i < parityPathList . length ; i ++ ) { parityPathList [ i ] = new Path ( codecList . get ( i ) . parityDirectory , makeRelative ( f ) ) ; } // undelete the src file. if ( ! fs . undelete ( f , userName ) ) { return false ; } // try to undelete the parity file for ( Path parityPath : parityPathList ) { fs . undelete ( parityPath , userName ) ; } return true ; }
undelete the parity file together with the src file .