apache/hadoop · error · UploaderException
Environment variable does not exist {var}
Error message
Environment variable does not exist {var} What it means
Error "Environment variable does not exist {var}" thrown in apache/hadoop.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/main/java/org/apache/hadoop/mapred/uploader/FrameworkUploader.java:398
}
}
@VisibleForTesting
String expandEnvironmentVariables(String innerInput, Map<String, String> env)
throws UploaderException {
boolean found;
do {
found = false;
Matcher matcher = VAR_SUBBER.matcher(innerInput);
StringBuffer stringBuffer = new StringBuffer();
while (matcher.find()) {
found = true;
String var = matcher.group(1);
// replace $env with the child's env constructed by tt's
String replace = env.get(var);
// the env key is not present anywhere .. simply set it
if (replace == null) {
throw new UploaderException("Environment variable does not exist " +
var);
}
matcher.appendReplacement(
stringBuffer, Matcher.quoteReplacement(replace));
}
matcher.appendTail(stringBuffer);
innerInput = stringBuffer.toString();
} while (found);
return innerInput;
}
private void addJar(File jar) throws UploaderException{
boolean found = false;
if (!jar.getName().endsWith(".jar")) {
LOG.info("Ignored non-jar " + jar.getAbsolutePath());
}
for (Pattern pattern : whitelistedFiles) {
Matcher matcher = pattern.matcher(jar.getAbsolutePath());View on GitHub (pinned to 2add963021)
Solutions
- Set the required environment variable before running the uploader, or pass the value via the corresponding CLI option/config key.
- Check the FrameworkUploader documentation for the expected variable name and export it in the shell.
Example fix
export HADOOP_HOME=/opt/hadoop && yarn jar ... FrameworkUploader ...
When it happens
Trigger: Thrown by FrameworkUploader when a required environment variable referenced by the upload configuration is not set. Export the named environment variable before running the framework uploader.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/28578f7953d946c4.
Report an issue: GitHub.