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/12/24 06:52:52 UTC

[GitHub] [incubator-hudi] yanghua commented on a change in pull request #1126: Fix Error: java.lang.IllegalArgumentException: Can not create a Path from an empty string

yanghua commented on a change in pull request #1126: Fix Error: java.lang.IllegalArgumentException: Can not create a Path from an empty string
URL: https://github.com/apache/incubator-hudi/pull/1126#discussion_r361082265
 
 

 ##########
 File path: hudi-client/src/main/java/org/apache/hudi/table/HoodieCopyOnWriteTable.java
 ##########
 @@ -109,7 +109,7 @@ public HoodieCopyOnWriteTable(HoodieWriteConfig config, JavaSparkContext jsc) {
         Tuple2<String, String> partitionDelFileTuple = iter.next();
         String partitionPath = partitionDelFileTuple._1();
         String delFileName = partitionDelFileTuple._2();
-        Path deletePath = new Path(new Path(basePath, partitionPath), delFileName);
+        Path deletePath = FSUtils.getPartitionPath(FSUtils.getPartitionPath(basePath, partitionPath), delFileName);
 
 Review comment:
   > Does this simply need a `new Path(FSUtils.getPartitionPath(basePath, partitionPath), delFileName)` ? We are overloading calling of `FSUtils.getPartitionPath`. for somethings that's not a partitionpath?
   
   I saw `FsUtils#getPartitionPath` can only avoid the second arg to be null. However, the outer `new Path(..., delFileName);` The `delFileName` can not be null?
   
   > Also can we please ensure there is a JIRA for fix.. or we follow the `[MINOR] ...` convention?
   > 
   
   Agree, I have mentioned in the approvement comment. Not sure whether `[MINOR]`  is a normal prefix if there is not a Jira issue to track. IMO, We should clearly record where. Or does it exist but I don't know?
   
   
   

----------------------------------------------------------------
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