{"record":{"id":"76641d5508a02bf1","repo":"apache/hadoop","slug":"unable-to-open-output-file-tmpoutput","errorCode":null,"errorMessage":"Unable to open output file {tmpOutput}","messagePattern":"Unable to open output file (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java","lineNumber":629,"sourceCode":"      blockSize = conf.getLong(HAR_BLOCKSIZE_LABEL, blockSize);\n      // get the output path and write to the tmp \n      // directory \n      partname = \"part-\" + partId;\n      tmpOutput = new Path(tmpOutputDir, partname);\n      rootPath = (conf.get(SRC_PARENT_LABEL, null) == null) ? null :\n                  new Path(conf.get(SRC_PARENT_LABEL));\n      if (rootPath == null) {\n        throw new RuntimeException(\"Unable to read parent \" +\n        \t\t\"path for har from config\");\n      }\n      try {\n        destFs = tmpOutput.getFileSystem(conf);\n        //this was a stale copy\n        destFs.delete(tmpOutput, false);\n        partStream = destFs.create(tmpOutput, false, conf.getInt(\"io.file.buffer.size\", 4096), \n            destFs.getDefaultReplication(tmpOutput), blockSize);\n      } catch(IOException ie) {\n        throw new RuntimeException(\"Unable to open output file \" + tmpOutput, ie);\n      }\n      buffer = new byte[buf_size];\n    }\n\n    // copy raw data.\n    public void copyData(Path input, FSDataInputStream fsin, \n        FSDataOutputStream fout, Reporter reporter) throws IOException {\n      try {\n        for (int cbread=0; (cbread = fsin.read(buffer))>= 0;) {\n          fout.write(buffer, 0,cbread);\n          reporter.progress();\n        }\n      } finally {\n        fsin.close();\n      }\n    }\n    \n    /**","sourceCodeStart":611,"sourceCodeEnd":647,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java#L611-L647","documentation":"Error \"Unable to open output file {tmpOutput}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java:629 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check write permissions and available space on the destination filesystem for the temporary output file."],"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-23T01:17:44.959Z"}