apache/hadoop · error · IllegalArgumentException
Resource type is %s but srcPaths were: %s
Error message
Resource type is %s but srcPaths were: %s
What it means
Error "Resource type is %s but srcPaths were: %s" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java:778
if (srcScheme == null
|| srcScheme.equals(FileSystem.getLocal(getConf()).getScheme())
|| srcScheme.equals("jar")) {
// Need to upload this resource to remote storage
List<File> srcFiles = srcURIs.stream().map(URI::getSchemeSpecificPart)
.map(File::new).collect(Collectors.toList());
Path dstPathBase = getRemoteStoragePath(getConf(), appId);
boolean shouldArchive = srcFiles.size() > 1
|| srcFiles.get(0).isDirectory()
|| (resource.getType() == LocalResourceType.ARCHIVE
&& Arrays.stream(ARCHIVE_FILE_TYPES).noneMatch(
suffix -> srcFiles.get(0).getName().endsWith(suffix)));
if (shouldArchive) {
if ("jar".equals(srcScheme)) {
throw new IllegalArgumentException(String.format("Resources in JARs "
+ "can't be zipped; resource %s is ARCHIVE and src is: %s",
resource.getResourcePath(), srcPathString));
} else if (resource.getType() != LocalResourceType.ARCHIVE) {
throw new IllegalArgumentException(
String.format("Resource type is %s but srcPaths were: %s",
resource.getType(), srcPathString));
}
dstPath = new Path(dstPathBase, resource.getResourcePath())
.suffix(".zip");
} else {
dstPath = new Path(dstPathBase, srcFiles.get(0).getName());
}
FileSystem remoteFS = dstPath.getFileSystem(getConf());
LOG.info("Uploading resource " + resource + " from " + srcPathString
+ " to " + dstPath);
try (OutputStream outputStream = remoteFS.create(dstPath, true)) {
if ("jar".equals(srcScheme)) {
try (InputStream inputStream = new URL(srcPaths[0]).openStream()) {
IOUtils.copyBytes(inputStream, outputStream, getConf());
}
} else if (shouldArchive) {
List<File> filesToZip;View on GitHub (pinned to 2add963021)
Solutions
- Match the resource type to the source paths: an ARCHIVE must reference a single archive file, not multiple or mismatched paths.
When it happens
Trigger: The resource type (FILE/ARCHIVE/PATTERN) declared for a dynamometer resource does not match the resolved source paths, e.g. an ARCHIVE type with no resolvable source file.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/8a220544b2eadcb8.
Report an issue: GitHub.