szknb opened a new issue, #6530:
URL: https://github.com/apache/hudi/issues/6530

   Hi, I follow the code of this demo to execute it: 
https://github.com/apache/hudi/blob/master/hudi-examples/hudi-examples-spark/src/main/java/org/apache/hudi/examples/spark/HoodieWriteClientExample.java
 , but I got "Invalid partition name [2020/01/02, 2020/01/01, 2020/01/03]", the 
information I can contribute is:
   
   1. Table and dir are created normally
   2. The code at the place where the exception is thrown seems to want the 
format of the partitionName I provided to be: "xxx=2020/xxx=01/xxx=02"
   3. The only change to the code in the demo is to annotate 
updates/Delete/compaction
   
   exception stack:
   `22/08/29 18:36:00 INFO ApplicationMaster: Unregistering ApplicationMaster 
with FAILED (diag message: User class threw exception: 
org.apache.hudi.exception.HoodieUpsertException: Failed to upsert for commit 
time 20220829183539
        at 
org.apache.hudi.table.action.commit.AbstractWriteHelper.write(AbstractWriteHelper.java:67)
        at 
org.apache.hudi.table.action.commit.SparkUpsertCommitActionExecutor.execute(SparkUpsertCommitActionExecutor.java:46)
        at 
org.apache.hudi.table.HoodieSparkCopyOnWriteTable.upsert(HoodieSparkCopyOnWriteTable.java:94)
        at 
org.apache.hudi.table.HoodieSparkCopyOnWriteTable.upsert(HoodieSparkCopyOnWriteTable.java:84)
        at 
org.apache.hudi.client.SparkRDDWriteClient.upsert(SparkRDDWriteClient.java:158)
        at org.example.HudiExample.main(HudiExample.java:95)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:810)
   Caused by: org.apache.hudi.exception.HoodieException: Invalid partition name 
[2020/01/02, 2020/01/01, 2020/01/03]
        at 
org.apache.hudi.common.util.CommitUtils.checkPartitionName(CommitUtils.java:153)
        at 
org.apache.hudi.common.util.CommitUtils.buildMetadataFromStats(CommitUtils.java:132)
        at 
org.apache.hudi.common.util.CommitUtils.buildMetadata(CommitUtils.java:95)
        at 
org.apache.hudi.table.action.commit.BaseSparkCommitActionExecutor.commit(BaseSparkCommitActionExecutor.java:283)
        at 
org.apache.hudi.table.action.commit.BaseSparkCommitActionExecutor.commit(BaseSparkCommitActionExecutor.java:269)
        at 
org.apache.hudi.table.action.commit.BaseCommitActionExecutor.commitOnAutoCommit(BaseCommitActionExecutor.java:124)
        at 
org.apache.hudi.table.action.commit.BaseSparkCommitActionExecutor.updateIndexAndCommitIfNeeded(BaseSparkCommitActionExecutor.java:258)
        at 
org.apache.hudi.table.action.commit.BaseSparkCommitActionExecutor.execute(BaseSparkCommitActionExecutor.java:169)
        at 
org.apache.hudi.table.action.commit.BaseSparkCommitActionExecutor.execute(BaseSparkCommitActionExecutor.java:80)
        at 
org.apache.hudi.table.action.commit.AbstractWriteHelper.write(AbstractWriteHelper.java:58)
        ... 10 more
   )`
   
   so what is the reason for this exception? thx


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to