apache/hadoop · error · UnsupportedOperationException
Not supported
Error message
Not supported
What it means
LocalJobRunner.getLogFileParams(JobID, TaskAttemptID) throws UnsupportedOperationException('Not supported') because the local engine keeps no per-attempt aggregated-log directories or LogParams records — that machinery (MR logs to NM/JobHistory via the MR AM) only exists in cluster mode. The same class also returns empty TaskReport[] and delegates most admin operations to no-ops.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapred/LocalJobRunner.java:1021
}
@Override
public Token<DelegationTokenIdentifier>
getDelegationToken(Text renewer) throws IOException, InterruptedException {
return null;
}
@Override
public long renewDelegationToken(Token<DelegationTokenIdentifier> token
) throws IOException,InterruptedException{
return 0;
}
@Override
public LogParams getLogFileParams(org.apache.hadoop.mapreduce.JobID jobID,
org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID)
throws IOException, InterruptedException {
throw new UnsupportedOperationException("Not supported");
}
static void setupChildMapredLocalDirs(Task t, JobConf conf) {
String[] localDirs = conf.getTrimmedStrings(MRConfig.LOCAL_DIR);
String jobId = t.getJobID().toString();
String taskId = t.getTaskID().toString();
boolean isCleanup = t.isTaskCleanupTask();
String user = t.getUser();
StringBuilder childMapredLocalDir =
new StringBuilder(localDirs[0] + Path.SEPARATOR
+ getLocalTaskDir(user, jobId, taskId, isCleanup));
for (int i = 1; i < localDirs.length; i++) {
childMapredLocalDir.append("," + localDirs[i] + Path.SEPARATOR
+ getLocalTaskDir(user, jobId, taskId, isCleanup));
}
LOG.debug(MRConfig.LOCAL_DIR + " for child : " + childMapredLocalDir);
conf.set(MRConfig.LOCAL_DIR, childMapredLocalDir.toString());
}View on GitHub (pinned to 2add963021)
Solutions
- Read the task's stdout/stderr directly from the local task work dir (see the task's system dir / local dirs)
- Run the job on YARN to use the JobHistory/NM log service
- Skip getLogFileParams when mapreduce.framework.name is local
Example fix
// before
LogParams lp = client.getLogFileParams(jobId, attemptId); // throws locally
// after
if (!"local".equals(conf.get("mapreduce.framework.name", "local"))) {
LogParams lp = client.getLogFileParams(jobId, attemptId);
} else {
// read stdout/stderr from the local task dir instead
} Defensive patterns
Strategy: validation
Validate before calling
if (!"local".equals(conf.get("mapreduce.framework.name", "local"))) {
LogParams lp = client.getLogFileParams(jobId, attemptId);
} else {
// locally: read stdout/stderr files from the task's local work dir
} Try / catch
try {
return client.getLogFileParams(jobId, attemptId);
} catch (UnsupportedOperationException e) {
return null; // local mode has no log service; caller falls back to local files
} Prevention
- Feature-detect local mode before using log-service APIs
- Point log collectors at the actual local output dirs when framework=local
When it happens
Trigger: Calling JobClient.getLogFileParams(jobId, taskAttemptId), e.g. via 'hadoop job -logs <jobid> <attemptid>', against a locally executed job.
Common situations: Log-fetching utilities or log-collection agents pointed at a local-mode job; debugging a local test with cluster-oriented log commands; tools that unconditionally query log params after job completion.
Related errors
- Changing job priority in LocalJobRunner is not supported.
- Killing tasks in LocalJobRunner is not supported
- getShuffleFinishTime() not supported for MapTask
- setShuffleFinishTime() not supported for MapTask
- getMapFinishTime() not supported for ReduceTask
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/e379b025fdac9913.
Report an issue: GitHub.