You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/07/02 12:56:48 UTC

[GitHub] [incubator-hudi] bvaradar commented on a change in pull request #771: fix error: java.lang.IllegalArgumentException: Can not create a Path from an empty string

bvaradar commented on a change in pull request #771: fix error: java.lang.IllegalArgumentException: Can not create a Path from an empty string
URL: https://github.com/apache/incubator-hudi/pull/771#discussion_r299467478
 
 

 ##########
 File path: hoodie-client/src/main/java/com/uber/hoodie/table/HoodieCopyOnWriteTable.java
 ##########
 @@ -315,7 +316,10 @@ protected HoodieMergeHandle getUpdateHandle(String commitTime, String fileId,
       throws IOException {
     logger.info("Cleaning path " + partitionPath);
     FileSystem fs = getMetaClient().getFs();
-    FileStatus[] toBeDeleted = fs.listStatus(new Path(config.getBasePath(), partitionPath), filter);
+    // FileStatus[] toBeDeleted = fs.listStatus(new Path(config.getBasePath(), partitionPath), filter);
+    FileStatus[] toBeDeleted = StringUtils.isBlank(partitionPath)
 
 Review comment:
   FSUtils.getPartitionPath below is supposed to handle this.Can you use that method directly everywhere to be consistent. If it does not work, can you fix the method ?
   
     public static Path getPartitionPath(Path basePath, String partitionPath) {
       // FOr non-partitioned table, return only base-path
       return ((partitionPath == null) || (partitionPath.isEmpty())) ? basePath :
           new Path(basePath, partitionPath);
     }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services