Skip to content

HDDS-14938. Implement Iceberg's RewriteTablePath action with input validation#10053

Open
sreejasahithi wants to merge 3 commits intoapache:masterfrom
sreejasahithi:HDDS-14938
Open

HDDS-14938. Implement Iceberg's RewriteTablePath action with input validation#10053
sreejasahithi wants to merge 3 commits intoapache:masterfrom
sreejasahithi:HDDS-14938

Conversation

@sreejasahithi
Copy link
Copy Markdown
Contributor

@sreejasahithi sreejasahithi commented Apr 6, 2026

What changes were proposed in this pull request?

This patch implements Iceberg's RewriteTablePath action and validates the inputs provided for the path rewrite.

Prefix Rewrite Configuration
Allow specifying:

  • sourcePrefix (existing path prefix)
  • targetPrefix (replacement prefix)
  • Ensure source and target prefixes are non-empty and not identical

Optional startVersion and endVersion inputs.

  • Validate that provided version exist in table.
  • Defaults:
    • endVersion → current metadata version if not provided
    • startVersion → if not set, rewrite applies up to end version from beginning version.

Staging Location Handling

  • Supports user-defined staging directory.
  • If not provided, automatically generates a staging path within the tables's metadata directory.

This change is required for upcoming patches in the epic: : HDDS-14937

What is the link to the Apache JIRA

HDDS-14938

How was this patch tested?

Green CI : https://github.com/sreejasahithi/ozone/actions/runs/24018893628

@sreejasahithi sreejasahithi marked this pull request as draft April 6, 2026 06:22
@sreejasahithi sreejasahithi changed the title HDDS-14938. Implement RewriteTablePath action with input validation HDDS-14938. Implement Iceberg's RewriteTablePath action with input validation Apr 6, 2026
@peterxcli peterxcli self-requested a review April 6, 2026 06:47
Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sreejasahithi for the patch.

Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sreejasahithi for updating the patch.

@sreejasahithi sreejasahithi requested a review from adoroszlai April 6, 2026 12:26
Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @sreejasahithi for updating the patch, LGTM.

Copy link
Copy Markdown
Contributor

@ashishkumar50 ashishkumar50 left a comment

Choose a reason for hiding this comment

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

@sreejasahithi Thanks for working on this, Can we put this into new module something like ozone-iceberg/tools instead of placing inside hadoop-ozone.

@adoroszlai
Copy link
Copy Markdown
Contributor

Can we put this into new module something like ozone-iceberg/tools instead of placing inside hadoop-ozone.

That would not fit existing build setup, why would we do that?

@ashishkumar50
Copy link
Copy Markdown
Contributor

Can we put this into new module something like ozone-iceberg/tools instead of placing inside hadoop-ozone.

That would not fit existing build setup, why would we do that?

Since this is specific just for iceberg ozone integration and not directly related to ozone module, so i was thinking not to put inside hadoop-ozone. If it doesn't fit in existing build setup then it is fine to put inside hadoop-ozone then.

@sreejasahithi
Copy link
Copy Markdown
Contributor Author

Can we put this into new module something like ozone-iceberg/tools instead of placing inside hadoop-ozone.

That would not fit existing build setup, why would we do that?

Since this is specific just for iceberg ozone integration and not directly related to ozone module, so i was thinking not to put inside hadoop-ozone. If it doesn't fit in existing build setup then it is fine to put inside hadoop-ozone then.

If we want to move the module outside hadoop-ozone then we would have to change the existing hadoop-ozone and root pom.xml and also add in 'hadoop-ozone/dist/src/main/assemblies/ozone-src.xml'.
Do we want to proceed with this or keep it in hadoop-ozone?
@adoroszlai and @ashishkumar50

@adoroszlai
Copy link
Copy Markdown
Contributor

we would have to change the existing hadoop-ozone and root pom.xml and also add in 'hadoop-ozone/dist/src/main/assemblies/ozone-src.xml'.

At least the following scripts would also need to be tweaked:

  • dev-support/ci/selective_ci_checks.sh and its test
  • hadoop-ozone/dev-support/checks/coverage.sh
  • hadoop-ozone/dev-support/checks/findbugs.sh

I don't see any reason to do increase the scope of this change with that.

@sreejasahithi sreejasahithi marked this pull request as ready for review April 7, 2026 13:21
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.

3 participants