apache/hadoop · error · IOException
All targets are failed.
Error message
All targets are failed.
What it means
Error "All targets are failed." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedWriter.java:122
void init() throws IOException {
DataChecksum checksum = reconstructor.getChecksum();
checksumSize = checksum.getChecksumSize();
bytesPerChecksum = checksum.getBytesPerChecksum();
int chunkSize = bytesPerChecksum + checksumSize;
maxChunksPerPacket = Math.max(
(WRITE_PACKET_SIZE - PacketHeader.PKT_MAX_HEADER_LEN) / chunkSize, 1);
int maxPacketSize = chunkSize * maxChunksPerPacket
+ PacketHeader.PKT_MAX_HEADER_LEN;
packetBuf = new byte[maxPacketSize];
int tmpLen = checksumSize *
(reconstructor.getBufferSize() / bytesPerChecksum);
checksumBuf = new byte[tmpLen];
if (initTargetStreams() == 0) {
String error = "All targets are failed.";
throw new IOException(error);
}
}
private void initTargetIndices() {
BitSet bitset = reconstructor.getLiveBitSet();
BitSet excludebitset=reconstructor.getExcludeBitSet();
int m = 0;
hasValidTargets = false;
for (int i = 0; i < dataBlkNum + parityBlkNum; i++) {
if (!bitset.get(i)) {
if (reconstructor.getBlockLen(i) > 0) {
if (m < targets.length && !excludebitset.get(i)) {
targetIndices[m++] = (short)i;
hasValidTargets = true;
}
}
}View on GitHub (pinned to 2add963021)
Solutions
- Check the target DataNodes for the striped write: look for full disks, failed volumes, or unreachable nodes and repair them.
- Ensure enough DataNodes are available to satisfy the EC policy's parity and data width.
- Retry the write after the targets recover; the client may also fall back to a contiguous block if configured.
When it happens
Trigger: Striped block write/recovery when every target DataNode in the pipeline has failed, so no stripe can be written.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/ded4248c3b3bcb42.
Report an issue: GitHub.