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 07:57:49 UTC

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

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

 ##########
 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:
   @vinothchandar
   If by name, it should be better to just modify`FSUtils.getPartitionPath(basePath, partitionPath)`. Maybe I should revert and put another PR?
   In hadoop 2.7+, I found that `new Path()` api use more stringent checks than ever before, if user use null to use `new Path(path, null)` in hadoop2.7-, it doesn't report error. 
   If it's for API compatibility, is it better to adjust its name to `buildMultiPath()` or else?So that all similar methods can be used, thus to ensure that no exception will happen.

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