{"record":{"id":"90bc997b4d20ce63","repo":"apache/hadoop","slug":"no-compressed-file-found-in-the-input-directory","errorCode":null,"errorMessage":"No compressed file found in the input directory : {}. To enable compression emulation, run Gridmix either with  an input directory containing compressed input file(s) or use the -generate option to (re)generate it. If compression emulation is not desired, disable it by setting 'gridmix.compression-emulation.enable' to 'false'.","messagePattern":"No compressed file found in the input directory : (.+?)\\. To enable compression emulation, run Gridmix either with  an input directory containing compressed input file\\(s\\) or use the -generate option to \\(re\\)generate it\\. If compression emulation is not desired, disable it by setting 'gridmix\\.compression-emulation\\.enable' to 'false'\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/CompressionEmulationUtil.java","lineNumber":348,"sourceCode":"      // check if the input file is compressed\n      if (compressionCodecs != null) {\n        CompressionCodec codec = compressionCodecs.getCodec(status.getPath());\n        if (codec != null) {\n          ++numCompressedFiles;\n          compressedDataSize += status.getLen();\n        }\n      }\n    }\n\n    LOG.info(\"Gridmix is configured to use compressed input data.\");\n    // publish the input data size\n    LOG.info(\"Total size of compressed input data : \" \n             + StringUtils.humanReadableInt(compressedDataSize));\n    LOG.info(\"Total number of compressed input data files : \" \n             + numCompressedFiles);\n\n    if (numCompressedFiles == 0) {\n      throw new RuntimeException(\"No compressed file found in the input\" \n          + \" directory : \" + inputDir.toString() + \". To enable compression\"\n          + \" emulation, run Gridmix either with \"\n          + \" an input directory containing compressed input file(s) or\" \n          + \" use the -generate option to (re)generate it. If compression\"\n          + \" emulation is not desired, disable it by setting '\" \n          + COMPRESSION_EMULATION_ENABLE + \"' to 'false'.\");\n    }\n    \n    // publish compression ratio only if its generated in this gridmix run\n    if (uncompressedDataSize > 0) {\n      // compute the compression ratio\n      double ratio = ((double)compressedDataSize) / uncompressedDataSize;\n\n      // publish the compression ratio\n      LOG.info(\"Input Data Compression Ratio : \" + ratio);\n    }\n    \n    return new DataStatistics(compressedDataSize, numCompressedFiles, true);","sourceCodeStart":330,"sourceCodeEnd":366,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/CompressionEmulationUtil.java#L330-L366","documentation":"Error \"No compressed file found in the input directory : {}. To enable compression emulation, run Gridmix either with  an input directory containing compressed input file(s) or use the -generate option to (re)generate it. If compression emulation is not desired, disable it by setting 'gridmix.compression-emulation.enable' to 'false'.\" thrown in apache/hadoop.","triggerScenarios":"Compression emulation is enabled for Gridmix but the input directory contains no compressed input file to derive the compression ratio from.","commonSituations":"See trigger scenarios.","solutions":["Put at least one compressed input file in the input directory, run Gridmix with -generate, or set gridmix.compression-emulation.enable=false."],"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"}