Federation Router Continuity vs DistCp Maintenance Window for Small-Cluster HDFS Migration
0 reputation · 02 Jul 2022, 10:37 UTC
0 reputation · 02 Jul 2022, 10:37 UTC
A small Hadoop application needs to move to a new cluster without a service outage, and the team is weighing two documented migration paths. HDFS Router-based Federation preserves a single filesystem view while underlying NameNodes are replaced, avoiding a hard client cutover. DistCp can replicate the dataset to a target cluster while the source stays live, but it requires an explicit final sync and a brief application pause or dual-write shim to avoid data loss.
Router-based Federation introduces an extra network hop and requires compatible HDFS client versions across all mounted NameServices, which increases version sensitivity during the migration. A router outage can also block access to all mounted namespaces even when the underlying NameNodes remain healthy. DistCp is decoupled from Hadoop version and can bridge clusters on different releases, but it does not reconcile writes that occur after the bulk copy starts, and it does not provide an atomic cutover.
For a very small dataset, the operational overhead of deploying and monitoring a router tier may outweigh the benefit compared with a short, controlled maintenance window. Confirm the exact Router-based Federation status and client compatibility matrix for the target Hadoop minor release before relying on it.
Which approach better fits a small application that must preserve a single namespace view without adding a router tier? If DistCp is chosen, how should the final incremental pass and quiesce window be sized to keep downtime within acceptable limits? How can client configuration updates such as fs.defaultFS and classpath dependencies be sequenced without breaking the existing view?
35275 reputation · 02 Jul 2022, 20:57 UTC
For a small application that must preserve one namespace view and will not deploy a router tier, use DistCp with a short planned maintenance window rather than HDFS Router-based Federation. DistCp avoids the router’s extra network hop, HA requirements, and release-sensitive mount table, but it is not a continuous single-namespace solution. It is a cutover: clients must be pointed to the target cluster after the final sync, and writes occurring between the last DistCp pass and client cutover are lost unless writers are paused.
Confirmed: DistCp can run while the source cluster is live, does not capture writes made after the bulk copy starts, and provides no atomic cutover. A final incremental pass plus writer quiesce is required to bound data loss.
Confirmed: Router-based Federation adds a network hop, and a router failure can block all mounted namespaces unless router HA is configured. Its support status and client compatibility matrix are release-specific, so the target Hadoop minor release must be checked before relying on it.
Likely: the final delta size is approximately the source write rate multiplied by the bulk-copy duration plus the final-pass duration. Write bursts can make this much larger than dataset size divided by average throughput, so measure it rather than estimate.
fs.defaultFS and classpath dependencies (Hadoop jars, site XML, keytabs if used) on all application nodes without activating them.hadoop fs -ls and a small write against the target while the old cluster remains available.fs.defaultFS to the target only after target checksum and count checks pass.hadoop distcp hdfs://source:8020/path hdfs://target:8020/path
hadoop fs -ls hdfs://target:8020/path
hadoop fs -Dfs.defaultFS=hdfs://target:8020 -test -d /What is the maximum acceptable cutover downtime? If it is shorter than the measured final-pass plus validation and restart time, the no-router DistCp window will not meet the requirement, and you should revisit router federation or dual-write after confirming release support.
Assumption: the application can tolerate a brief writer pause. Router federation status and client compatibility for the target release are unverified and require release-specific documentation review.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.