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

 ##########
 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:
   @bvaradar 
   When I rebuilt hoodie with spark-2.3.3 and parquet-1.8.2 and avro-1.8.2 and 
run test class `HoodieJavaApp`, it reported error ` Can not create a Path from 
an empty string`. But spark-2.1.0 didn't. Here is my version:
   ```
     <properties>
       <maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
       <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
       <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
       <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
       <fasterxml.version>2.6.7</fasterxml.version>
       <parquet.version>1.8.2</parquet.version>
       <junit.version>4.11</junit.version>
       <mockito.version>1.9.5</mockito.version>
       <log4j.version>1.2.17</log4j.version>
       <joda.version>2.9.9</joda.version>
       <hadoop.version>2.7.3</hadoop.version>
       <hive.groupid>org.apache.hive</hive.groupid>
       <hive.version>2.3.1</hive.version>
       <metrics.version>4.0.2</metrics.version>
       <spark.version>2.3.3</spark.version>
       <avro.version>1.8.2</avro.version>
       <scala.version>2.11.8</scala.version>
       <scala.libversion>2.11</scala.libversion>
       
<surefire-log4j.file>file://${project.basedir}/src/test/resources/log4j-surefire.properties</surefire-log4j.file>
       <thrift.version>0.12.0</thrift.version>
       <hbase.version>1.2.3</hbase.version>
       <codehaus-jackson.version>1.9.13</codehaus-jackson.version>
       <notice.dir>${project.basedir}</notice.dir>
       <notice.file>NOTICE.txt</notice.file>
     </properties>
   ```
   I think I can write a common method in FsUtils.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to