Skip to content

Conversation

@YannByron
Copy link
Contributor

Tips

What is the purpose of the pull request

(For example: This pull request adds quick-start document.)

Brief change log

(for example:)

  • Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end.
  • Added HoodieClientWriteTest to verify the change.
  • Manually verified the change by running a job locally.

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@YannByron
Copy link
Contributor Author

@hudi-bot run azure

classOf[ValidateDuplicateKeyPayload].getCanonicalName
} else {
classOf[DefaultHoodieRecordPayload].getCanonicalName
classOf[OverwriteWithLatestAvroPayload].getCanonicalName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with #4169

super.run(sparkSession)
try {
// Delete all data in the table directory
super.run(sparkSession)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will throw exception and cause failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the process, call the TruncateTableCommand in Spark first and reconstruct the hoodie's table.
Within the TruncateTableCommand in Spark, it will delete the related directories first, and refresh the table which will fail because .hoodie dir has gone and it can't resolve hudi's relation. So I catch this and ignore this.

The related error as following:

Cause: org.apache.hudi.exception.TableNotFoundException: Hoodie table not found in path Unable to find a hudi table for the user provided paths.
  at org.apache.hudi.DataSourceUtils.getTablePath(DataSourceUtils.java:85)
  at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:103)
  at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:348)
  at org.apache.spark.sql.execution.datasources.FindDataSourceTable.$anonfun$readDataSourceTable$1(DataSourceStrategy.scala:252)

Copy link
Member

@xushiyan xushiyan Jan 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YannByron looks like it deserves a log statement or comment in the catch block to help explain the try catch scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done~

Seq("year=2021/month=02/day=01")
)
checkAnswer(s"show partitions $tableName partition(day=01)")(
checkAnswer(s"show partitions $tableName partition(day='01')")(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here partition must be in string format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's related to the origin type of the field. In this case, day is string type.

@YannByron
Copy link
Contributor Author

@hudi-bot run azure

@xushiyan xushiyan self-assigned this Jan 2, 2022
Copy link
Member

@xushiyan xushiyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

super.run(sparkSession)
try {
// Delete all data in the table directory
super.run(sparkSession)
Copy link
Member

@xushiyan xushiyan Jan 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YannByron looks like it deserves a log statement or comment in the catch block to help explain the try catch scenario?

@leesf
Copy link
Contributor

leesf commented Jan 2, 2022

@hudi-bot run azure

@hudi-bot
Copy link
Collaborator

hudi-bot commented Jan 2, 2022

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@xushiyan xushiyan merged commit 1622b52 into apache:master Jan 2, 2022
@vinishjail97 vinishjail97 mentioned this pull request Jan 5, 2022
5 tasks
@vinishjail97 vinishjail97 mentioned this pull request Jan 24, 2022
5 tasks
liusenhua pushed a commit to liusenhua/hudi that referenced this pull request Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants