HDFS-1606 added the capability for the DFSClient to add DataNodes to an existing write pipeline. HDFS-2832 and HDFS-5318 introduce read-only replicas to HDFS. This JIRA proposes using the HDFS-1606 addDatanode2ExistingPipeline() capability to enable recovering in scenarios where only read-only replicas are available (i.e. all read-write replicas are offline).
The following scenarios should be supported:
- Recovering an initial write pipeline with repcount=1 (see
HDFS-5434) when the datanode hosting the r/w replica fails (but r/o replicas are available)
- Constructing an append pipeline for a block where the r/w replica is offline (but r/o replicas are available)
In both cases, a pipeline of length 0 can be "bootstrapped" to a pipeline of length 1 using available r/o replicas.