Skip to content

[HUDI-8015] Fix Glue Meta Sync Failure with recreating the table#11677

Merged
codope merged 3 commits intoapache:masterfrom
vamsikarnika:HUDI-8015
Aug 8, 2024
Merged

[HUDI-8015] Fix Glue Meta Sync Failure with recreating the table#11677
codope merged 3 commits intoapache:masterfrom
vamsikarnika:HUDI-8015

Conversation

@vamsikarnika
Copy link
Collaborator

@vamsikarnika vamsikarnika commented Jul 23, 2024

Change Logs

Updated AwsGlueCatalaogSyncClient createOrReplace method to drop and create the table, instead of updating the table.
Updated the check to compare the base of the hudi table and metastore table location to ignore file schemas.

Impact

AWS Glue table will be dropped and recreated using the latest schema.

Risk level (write none, low medium or high below)

low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Jul 23, 2024
dropTable(tempTableName);
// drop and recreate the actual table
dropTable(tableName);
createTable(tableName, storageSchema, inputFormatClass, outputFormatClass, serdeClass, serdeProperties, tableProperties);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this change needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @CTTY, With the previous approach createOrReplaceTable is not functioning in the expected way. We observed that partitions are not dropped when the updateTable is called with latest properties. This is causing issues with the glue sync.

In this approach, we're dropping the table and creating the new table which should solve this issue.

@vamsikarnika vamsikarnika requested a review from CTTY July 30, 2024 05:54
@vamsikarnika vamsikarnika changed the title [HUDI-8015] Fix Glue Meta Sync Failure on base path change [HUDI-8015] Fix Glue Meta Sync Failure with recreating the table Jul 30, 2024
@hudi-bot
Copy link
Collaborator

hudi-bot commented Aug 8, 2024

CI report:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M PR with lines of changes in (100, 300]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments