{"record":{"id":"781863c26281c6bc","repo":"apache/hadoop","slug":"contextcfgitemname-not-configured","errorCode":null,"errorMessage":"${contextCfgItemName} not configured","messagePattern":"(.+?) not configured","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java","lineNumber":319,"sourceCode":"      }\n    }\n\n    public AllocatorPerContext(String contextCfgItemName,\n            DiskValidator diskValidator) {\n      this.contextCfgItemName = contextCfgItemName;\n      this.currentContext = new AtomicReference<Context>(new Context());\n      this.diskValidator = diskValidator;\n    }\n\n    /** This method gets called everytime before any read/write to make sure\n     * that any change to localDirs is reflected immediately.\n     */\n    private Context confChanged(Configuration conf)\n        throws IOException {\n      Context ctx = currentContext.get();\n      String newLocalDirs = conf.get(contextCfgItemName);\n      if (null == newLocalDirs) {\n        throw new IOException(contextCfgItemName + \" not configured\");\n      }\n      if (!newLocalDirs.equals(ctx.savedLocalDirs)) {\n        ctx = new Context();\n        String[] dirStrings = StringUtils.getTrimmedStrings(newLocalDirs);\n        ctx.localFS = FileSystem.getLocal(conf);\n        int numDirs = dirStrings.length;\n        ArrayList<Path> dirs = new ArrayList<Path>(numDirs);\n        ArrayList<DF> dfList = new ArrayList<DF>(numDirs);\n        for (int i = 0; i < numDirs; i++) {\n          try {\n            // filter problematic directories\n            Path tmpDir = new Path(dirStrings[i]);\n            if(ctx.localFS.mkdirs(tmpDir)|| ctx.localFS.exists(tmpDir)) {\n              try {\n                File tmpFile = tmpDir.isAbsolute()\n                    ? new File(ctx.localFS.makeQualified(tmpDir).toUri())\n                    : new File(dirStrings[i]);\n","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java#L301-L337","documentation":"Error \"${contextCfgItemName} not configured\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalDirAllocator.java:319 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set ${contextCfgItemName} (e.g. mapreduce.job.local.dir or yarn.nodemanager.local-dirs) in the configuration.","Verify the configuration object loaded the expected *-site.xml resources."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}