apache/hadoop · error · IOException
<file-under-construction> found without <clientName>
Error message
<file-under-construction> found without <clientName>
What it means
Error "<file-under-construction> found without <clientName>" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java:694
Node blocks = node.removeChild(INODE_SECTION_BLOCKS);
if (blocks != null) {
while (true) {
Node block = blocks.removeChild(INODE_SECTION_BLOCK);
if (block == null) {
break;
}
bld.addBlocks(createBlockBuilder(block));
}
}
Node fileUnderConstruction =
node.removeChild(INODE_SECTION_FILE_UNDER_CONSTRUCTION);
if (fileUnderConstruction != null) {
INodeSection.FileUnderConstructionFeature.Builder fb =
INodeSection.FileUnderConstructionFeature.newBuilder();
String clientName =
fileUnderConstruction.removeChildStr(INODE_SECTION_CLIENT_NAME);
if (clientName == null) {
throw new IOException("<file-under-construction> found without " +
"<clientName>");
}
fb.setClientName(clientName);
String clientMachine =
fileUnderConstruction
.removeChildStr(INODE_SECTION_CLIENT_MACHINE);
if (clientMachine == null) {
throw new IOException("<file-under-construction> found without " +
"<clientMachine>");
}
fb.setClientMachine(clientMachine);
bld.setFileUC(fb);
}
Node acls = node.removeChild(INODE_SECTION_ACLS);
if (acls != null) {
bld.setAcl(aclXmlToProto(acls));
}
Node xattrs = node.removeChild(INODE_SECTION_XATTRS);View on GitHub (pinned to 2add963021)
Solutions
- Add the missing <clientName> element to the <file-under-construction> stanza in the fsimage XML.
- Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage instead of editing it by hand.
When it happens
Trigger: Thrown by oiv -r when a <file-under-construction> stanza lacks the required <clientName> element in the fsimage XML.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/53ea176395465274.
Report an issue: GitHub.