{"record":{"id":"e379b025fdac9913","repo":"apache/hadoop","slug":"not-supported-e379b0","errorCode":null,"errorMessage":"Not supported","messagePattern":"Not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapred/LocalJobRunner.java","lineNumber":1021,"sourceCode":"  }\n\n  @Override\n  public Token<DelegationTokenIdentifier> \n     getDelegationToken(Text renewer) throws IOException, InterruptedException {\n    return null;\n  }\n\n  @Override\n  public long renewDelegationToken(Token<DelegationTokenIdentifier> token\n                                      ) throws IOException,InterruptedException{\n    return 0;\n  }\n\n  @Override\n  public LogParams getLogFileParams(org.apache.hadoop.mapreduce.JobID jobID,\n      org.apache.hadoop.mapreduce.TaskAttemptID taskAttemptID)\n      throws IOException, InterruptedException {\n    throw new UnsupportedOperationException(\"Not supported\");\n  }\n  \n  static void setupChildMapredLocalDirs(Task t, JobConf conf) {\n    String[] localDirs = conf.getTrimmedStrings(MRConfig.LOCAL_DIR);\n    String jobId = t.getJobID().toString();\n    String taskId = t.getTaskID().toString();\n    boolean isCleanup = t.isTaskCleanupTask();\n    String user = t.getUser();\n    StringBuilder childMapredLocalDir =\n        new StringBuilder(localDirs[0] + Path.SEPARATOR\n            + getLocalTaskDir(user, jobId, taskId, isCleanup));\n    for (int i = 1; i < localDirs.length; i++) {\n      childMapredLocalDir.append(\",\" + localDirs[i] + Path.SEPARATOR\n          + getLocalTaskDir(user, jobId, taskId, isCleanup));\n    }\n    LOG.debug(MRConfig.LOCAL_DIR + \" for child : \" + childMapredLocalDir);\n    conf.set(MRConfig.LOCAL_DIR, childMapredLocalDir.toString());\n  }","sourceCodeStart":1003,"sourceCodeEnd":1039,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapred/LocalJobRunner.java#L1003-L1039","documentation":"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.","triggerScenarios":"Calling JobClient.getLogFileParams(jobId, taskAttemptId), e.g. via 'hadoop job -logs <jobid> <attemptid>', against a locally executed job.","commonSituations":"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.","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"],"exampleFix":"// before\nLogParams lp = client.getLogFileParams(jobId, attemptId); // throws locally\n\n// after\nif (!\"local\".equals(conf.get(\"mapreduce.framework.name\", \"local\"))) {\n  LogParams lp = client.getLogFileParams(jobId, attemptId);\n} else {\n  // read stdout/stderr from the local task dir instead\n}","handlingStrategy":"validation","validationCode":"if (!\"local\".equals(conf.get(\"mapreduce.framework.name\", \"local\"))) {\n  LogParams lp = client.getLogFileParams(jobId, attemptId);\n} else {\n  // locally: read stdout/stderr files from the task's local work dir\n}","typeGuard":null,"tryCatchPattern":"try {\n  return client.getLogFileParams(jobId, attemptId);\n} catch (UnsupportedOperationException e) {\n  return null; // local mode has no log service; caller falls back to local files\n}","preventionTips":["Feature-detect local mode before using log-service APIs","Point log collectors at the actual local output dirs when framework=local"],"tags":["hadoop","mapreduce","local-mode","task-logs","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}