question: public static void renameTableForDeletion ( int partitionCount , String storePath , String databaseName , String tableName ) { String tableNameWithPartition = "" ; String databaseNameWithPartition = "" ; String fullPath = "" ; String newFilePath = "" ; String newFileName = "" ; Callable < Void > c = null ; long time = System . currentTimeMillis ( ) ; FileFactory . FileType fileType = null ; ExecutorService executorService = Executors . newFixedThreadPool ( 10 ) ; for ( int i = 0 ; i < partitionCount ; i ++ ) { databaseNameWithPartition = databaseName + '_' + i ; tableNameWithPartition = tableName + '_' + i ; newFileName = tableNameWithPartition + '_' + time ; fullPath = storePath + File . separator + databaseNameWithPartition + File . separator + tableNameWithPartition ; newFilePath = storePath + File . separator + databaseNameWithPartition + File . separator + newFileName ; fileType = FileFactory . getFileType ( fullPath ) ; try { if ( FileFactory . isFileExist ( fullPath , fileType ) ) { CarbonFile file = FileFactory . getCarbonFile ( fullPath , fileType ) ; boolean isRenameSuccessfull = file . renameTo ( newFilePath ) ; if ( ! isRenameSuccessfull ) { LOGGER . error ( "Problem renaming the table :: " + fullPath ) ; c = new DeleteFolderAndFiles ( file ) ; executorService . submit ( c ) ; } else { c = new DeleteFolderAndFiles ( FileFactory . getCarbonFile ( newFilePath , fileType ) ) ; executorService . submit ( c ) ; } } } catch ( IOException e ) { LOGGER . error ( "Problem renaming the table :: " + fullPath ) ; } } executorService . shutdown ( ) ; }
target:  This function will rename the table to be deleted