{"record":{"id":"9be8f391ad0bdcc4","repo":"apache/hadoop","slug":"negative-mapreduce-input-sequencefileinputfilter-f","errorCode":null,"errorMessage":"Negative mapreduce.input.sequencefileinputfilter.frequency: {frequency}","messagePattern":"Negative mapreduce\\.input\\.sequencefileinputfilter\\.frequency: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/SequenceFileInputFilter.java","lineNumber":164,"sourceCode":"    }\n  }\n\n  /** This class returns a percentage of records\n   * The percentage is determined by a filtering frequency <i>f</i> using\n   * the criteria record# % f == 0.\n   * For example, if the frequency is 10, one out of 10 records is returned.\n   */\n  public static class PercentFilter extends FilterBase {\n    private int frequency;\n    private int count;\n\n    /** set the frequency and stores it in conf\n     * @param conf configuration\n     * @param frequency filtering frequencey\n     */\n    public static void setFrequency(Configuration conf, int frequency) {\n      if (frequency <= 0)\n        throw new IllegalArgumentException(\n          \"Negative \" + FILTER_FREQUENCY + \": \" + frequency);\n      conf.setInt(FILTER_FREQUENCY, frequency);\n    }\n        \n    public PercentFilter() { }\n        \n    /** configure the filter by checking the configuration\n     * \n     * @param conf configuration\n     */\n    public void setConf(Configuration conf) {\n      this.frequency = conf.getInt(FILTER_FREQUENCY, 10);\n      if (this.frequency <= 0) {\n        throw new RuntimeException(\n          \"Negative \"+FILTER_FREQUENCY + \": \" + this.frequency);\n      }\n      this.conf = conf;\n    }","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/SequenceFileInputFilter.java#L146-L182","documentation":"Error \"Negative mapreduce.input.sequencefileinputfilter.frequency: {frequency}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/SequenceFileInputFilter.java:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set mapreduce.input.sequencefileinputfilter.frequency to a non-negative integer."],"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"}