apache/druid · warning
Skipping deep storage directory kill: backslash not allowed
Error message
Skipping deep storage directory kill: backslash not allowed in path [%s]
What it means
constructHdfsDeletePath rejects relative paths containing a backslash ('\'), logging this warning and returning null. Backslashes are illegal in HDFS path components in this context and usually indicate a Windows-style or escaped path that doesn't belong in HDFS deep storage; deleting based on it would be unsafe.
Source
Thrown at extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsDataSegmentKiller.java:191
}
/**
* Construct a path to delete from HDFS. Returns null if the path is invalid.
* Replicates how {@link HdfsDataSegmentPusher#pushToPath} handles ':', by replacing that with '_'.
*/
@Nullable
private Path constructHdfsDeletePath(String relativePath)
{
if (Strings.isNullOrEmpty(relativePath)) {
log.warn("Skipping deep storage directory kill: relative path is empty");
return null;
}
if (relativePath.charAt(0) == '/') {
log.warn("Skipping deep storage directory kill: relative path must not be absolute, got [%s]", relativePath);
return null;
}
if (relativePath.indexOf('\\') >= 0) {
log.warn("Skipping deep storage directory kill: backslash not allowed in path [%s]", relativePath);
return null;
}
for (String segment : StringUtils.splitPreserveAllTokens(relativePath, '/')) {
if (segment.isEmpty() || "..".equals(segment)) {
log.warn("Skipping deep storage directory kill: invalid path[%s]", relativePath);
return null;
}
}
if (storageDirectory == null) {
log.warn("Skipping deep storage directory kill: storage directory not configured");
return null;
}
final String hdfsRelativePath = relativePath.replace(':', '_');
final String storageDirectoryString = storageDirectory.toString();
final String sep = storageDirectoryString.endsWith(Path.SEPARATOR) ? "" : Path.SEPARATOR;
return new Path(storageDirectoryString + sep + hdfsRelativePath);View on GitHub (pinned to 9b90983fd2)
Solutions
- Fix the segment path in the metadata store to use '/' separators
- Re-push affected segments with a correctly configured (Linux-style path) pusher
- Skip killing these segments manually via hdfs dfs -rm once you locate the real path
Example fix
// before "path": "datasource\\interval\...\index.zip" // after "path": "datasource/interval/.../index.zip"
Defensive patterns
Strategy: validation
Validate before calling
if (segmentPath.contains("\\")) {
throw new IllegalArgumentException("segment path must use '/' separators: " + segmentPath);
} Type guard
static boolean usesPosixSeparators(String p) { return p != null && p.indexOf('\\') < 0; } Prevention
- Run ingestion on POSIX-style path configurations
- Normalize Windows-style paths to '/' before pushing
- Never hand-edit segment paths with escaped separators
When it happens
Trigger: A DataSegment's relative loadSpec path contains '\' characters, e.g. segments produced with Windows file separators or double-escaped paths.
Common situations: Segments generated on Windows-based ingestion tooling, manually constructed segment JSON with escaped separators, or copying segment metadata between Windows and Linux clusters.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- Skipping deep storage directory kill: relative path is empty
- Skipping deep storage directory kill: relative path must not
- Skipping deep storage directory kill: invalid path[%s]
- Segment path [%s] does not exist
- Skipping deep storage directory kill: storage directory not
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/fbee7421a78e3c5f.
Report an issue: GitHub.