Github user chandrasaripaka commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2161#discussion_r241983377 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFile.java --- @@ -94,14 +93,9 @@ public CarbonFile getParentFile() { public boolean renameForce(String changeToName) { FileSystem fs; try { - fs = fileStatus.getPath().getFileSystem(FileFactory.getConfiguration()); - if (fs instanceof DistributedFileSystem) { - ((DistributedFileSystem) fs).rename(fileStatus.getPath(), new Path(changeToName), - org.apache.hadoop.fs.Options.Rename.OVERWRITE); - return true; - } else { - return false; - } + fs = fileStatus.getPath().getFileSystem(hadoopConf); + fs.delete(new Path(changeToName), true); + return fs.rename(fileStatus.getPath(), new Path(changeToName)); --- End diff -- Actually no I mean..it checks for the existence of the file and renames only ( else it will return false), but will not do a force rename. But I am thinking we can use the same alluxio fs copy, programatically to copy the same contents from one file to another file(changedName under the same directory).
---