apache/hadoop · error · IOException
Failed to create ${filePath}
Error message
Failed to create ${filePath} What it means
Error "Failed to create ${filePath}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/PmemVolumeManager.java:459
* @param volumeIndex The index of pmem volume where a replica will be
* cached to or has been cached to.
*
* @param key The replica's ExtendedBlockId.
*
* @return A path to which the block replica is mapped.
*/
public String idToCacheFilePath(Byte volumeIndex, ExtendedBlockId key)
throws IOException {
final String cacheSubdirPrefix = "subdir";
long blockId = key.getBlockId();
String bpid = key.getBlockPoolId();
int d1 = (int) ((blockId >> 16) & 0x1F);
int d2 = (int) ((blockId >> 8) & 0x1F);
String parentDir = pmemVolumes.get(volumeIndex) + "/" + bpid;
String subDir = cacheSubdirPrefix + d1 + "/" + cacheSubdirPrefix + d2;
File filePath = new File(parentDir, subDir);
if (!filePath.exists() && !filePath.mkdirs()) {
throw new IOException("Failed to create " + filePath.getPath());
}
return filePath.getAbsolutePath() + "/" + idToCacheFileName(key);
}
/**
* The cache file path is pmemVolume/BlockPoolId/subdir#/subdir#/BlockId.
*/
public String getCachePath(ExtendedBlockId key) throws IOException {
Byte volumeIndex = blockKeyToVolume.get(key);
if (volumeIndex == null) {
return null;
}
return idToCacheFilePath(volumeIndex, key);
}
@VisibleForTesting
Map<ExtendedBlockId, Byte> getBlockKeyToVolume() {
return blockKeyToVolume;View on GitHub (pinned to 2add963021)
Solutions
- Check permissions and free space on the pmem volume; create the parent directories if missing.
- Verify the pmem device is mounted and healthy.
When it happens
Trigger: Pmem block caching when the backing cache file cannot be created on the pmem volume.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/064c332f47dfaa5a.
Report an issue: GitHub.