apache/hadoop · error · IOException
Destination path not specified.
Error message
Destination path not specified.
What it means
Error "Destination path not specified." thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java:891
if (i == (args.length - 1)) {
destPath = new Path(args[i]);
if (!destPath.isAbsolute()) {
destPath = destPath.getFileSystem(getConf()).makeQualified(destPath);
}
}
else {
Path argPath = new Path(args[i]);
if (argPath.isAbsolute()) {
printUsage(options, false);
throw new IOException("Source path " + argPath +
" is not relative to "+ parentPath);
}
srcPaths.add(new Path(parentPath, argPath));
}
}
if (destPath == null) {
printUsage(options, false);
throw new IOException("Destination path not specified.");
}
if (srcPaths.size() == 0) {
// assuming if the user does not specify path for sources
// the whole parent directory needs to be archived.
srcPaths.add(parentPath);
}
// do a glob on the srcPaths and then pass it on
List<Path> globPaths = new ArrayList<Path>();
for (Path p: srcPaths) {
FileSystem fs = p.getFileSystem(getConf());
FileStatus[] statuses = fs.globStatus(p);
if (statuses != null) {
for (FileStatus status: statuses) {
globPaths.add(fs.makeQualified(status.getPath()));
}
}
}
if (globPaths.isEmpty()) {View on GitHub (pinned to 2add963021)
Solutions
- Pass a destination path argument to the hadoop archive command.
When it happens
Trigger: Thrown at hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java:891 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/87d034db518f00f1.
Report an issue: GitHub.