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

    https://github.com/apache/carbondata/pull/2161#discussion_r185777526
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/datastore/filesystem/AlluxioCarbonFile.java
 ---
    @@ -105,18 +103,21 @@ public CarbonFile getParentFile() {
         return null == parent ? null : new AlluxioCarbonFile(parent);
       }
     
    +  /**
    +   * CARBON-2218 Adopting to {@link FileSystem} , in accordance
    +   * with the AlluxioFileSystem Implementation.
    +   * Implicit expection of the AlluxioFileSystem when using this method.
    +   * If success, returns true else false when an Exception is raised.
    +   * @param changetoName
    +   * @return
    +   */
       @Override
       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.delete(new Path(changetoName), true);
    --- End diff --
    
    It's a dangerous operation as we cannot get back the file once it is 
removed. So failure cases may lead to system inconsistent.  Since Alluxio does 
not support rename we should try to bring the framework where we should not use 
renameForce. We will work on it. 


---

Reply via email to