Sreeja created HDDS-14939:
-----------------------------
Summary: Implement version file rewrite logic for path migration
across metadata history
Key: HDDS-14939
URL: https://issues.apache.org/jira/browse/HDDS-14939
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Sreeja
Assignee: Sreeja
This change implements the logic to {*}rewrite table metadata version files
across the metadata history{*}, enabling path migration from a source prefix to
a target prefix.
The implementation traverses metadata versions (current + previous), rewrites
each version file, and generates a *copy plan* for staging and final file
placement.
----
h3. *Key Functionality*
* *Metadata Version Traversal*
** Starts from the provided {{endMetadata}} (current or specified end version).
** Iterates backward through {{previousFiles()}} until reaching the configured
{{{}startVersion{}}}.
** Ensures each version file exists before processing.
* *Snapshot Collection*
** Collects all snapshots from:
*** current metadata
*** each traversed historical metadata version
* *Version File Rewrite*
** For each metadata version:
*** Rewrites file paths using {{sourcePrefix}} → {{{}targetPrefix{}}}.
*** Generates a new metadata file in the staging location.
* *Copy Plan Generation*
** Builds a mapping of:
*** *staged file path → final target path*
----
h3. *Output*
Returns a {{RewriteResult<Snapshot>}} containing:
* *Snapshots to rewrite* → all collected snapshots across versions
* *Copy plan* → set of {{(staging path, final path)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]