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

2019-12-31 Thread GitBox
vinothchandar 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_r362297795
 
 

 ##
 File path: 
hudi-client/src/main/java/org/apache/hudi/table/HoodieCopyOnWriteTable.java
 ##
 @@ -109,7 +109,7 @@ public HoodieCopyOnWriteTable(HoodieWriteConfig config, 
JavaSparkContext jsc) {
 Tuple2 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:
   I think we can do a follow up small fix here.. confirm `delFileName` cannot 
be null and then remove the outer `FSUtils.getPartitionPath`. This one can have 
`[MINOR]` prefix IMO 


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:
us...@infra.apache.org


With regards,
Apache Git Services


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

2019-12-23 Thread GitBox
vinothchandar 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_r361079699
 
 

 ##
 File path: 
hudi-client/src/main/java/org/apache/hudi/table/HoodieCopyOnWriteTable.java
 ##
 @@ -109,7 +109,7 @@ public HoodieCopyOnWriteTable(HoodieWriteConfig config, 
JavaSparkContext jsc) {
 Tuple2 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? 
   
   Also can we please ensure there is a JIRA for fix.. or we follow the 
`[MINOR] ...` convention?
   
   @cdmikechen @yanghua wdyt 


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:
us...@infra.apache.org


With regards,
Apache Git Services