{"record":{"id":"cf02dc6541603562","repo":"apache/hadoop","slug":"invalid-inputs-are-found-all-being-null-cf02dc","errorCode":null,"errorMessage":"Invalid inputs are found, all being null","messagePattern":"Invalid inputs are found, all being null","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil.java","lineNumber":180,"sourceCode":"      }\n    }\n\n    return Arrays.copyOf(nullIndexes, idx);\n  }\n\n  /**\n   * Find the valid input from all the inputs.\n   * @param inputs input buffers to look for valid input\n   * @return the first valid input\n   */\n  static <T> T findFirstValidInput(T[] inputs) {\n    for (T input : inputs) {\n      if (input != null) {\n        return input;\n      }\n    }\n\n    throw new HadoopIllegalArgumentException(\n        \"Invalid inputs are found, all being null\");\n  }\n\n  /**\n   * Picking up indexes of valid inputs.\n   * @param inputs decoding input buffers\n   * @param <T>\n   */\n  static <T> int[] getValidIndexes(T[] inputs) {\n    int[] validIndexes = new int[inputs.length];\n    int idx = 0;\n    for (int i = 0; i < inputs.length; i++) {\n      if (inputs[i] != null) {\n        validIndexes[idx++] = i;\n      }\n    }\n\n    return Arrays.copyOf(validIndexes, idx);","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil.java#L162-L198","documentation":"Error \"Invalid inputs are found, all being null\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/CoderUtil.java:180 when the library encounters an invalid state.","commonSituations":"Occurs when all input buffers passed to the coder are null. Ensure at least the required number of valid input buffers are supplied before encoding/decoding.","solutions":["Provide at least one non-null input; an all-null inputs array indicates erasedIndexes or buffer construction is wrong.","Check the caller logic that builds the inputs array against the erased block list."],"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"}