Github user kevinjmh commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/3005#discussion_r243150578
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFile.java
 ---
    @@ -95,15 +94,13 @@ 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;
    +      Path targetPath = new Path(changeToName);
    +      if (fs.exists(targetPath)) {
    +        fs.delete(targetPath, true);
    --- End diff --
    
    This should be managed by developer. If developer wants a simple rename, he 
should call `renameTo` instead of `renameForce`. Codes in this PR implements 
the OVERWRITE(delete before rename),  as `S3CarbonFile` , `ViewFSCarbonFile`, 
`LocalCarbonFile` do


---

Reply via email to