You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by chandrasaripaka <gi...@git.apache.org> on 2018/07/04 09:28:30 UTC

[GitHub] carbondata pull request #2161: [CARBONDATA-2218] AlluxioCarbonFile while try...

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

    https://github.com/apache/carbondata/pull/2161#discussion_r200064110
  
    --- 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 --
    
    Any update on this. Can you suggest on a alternative way.


---