{"record":{"id":"11d8e0999f6be2b1","repo":"apache/hadoop","slug":"value-class-has-to-be-typedbyteswritable","errorCode":null,"errorMessage":"value class has to be TypedBytesWritable","messagePattern":"value class has to be TypedBytesWritable","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesWritableInput.java","lineNumber":301,"sourceCode":"  }\n\n  public Text readText(Text t) throws IOException {\n    if (t == null) {\n      t = new Text();\n    }\n    t.set(in.readString());\n    return t;\n  }\n\n  public Text readText() throws IOException {\n    return readText(null);\n  }\n\n  public ArrayWritable readArray(ArrayWritable aw) throws IOException {\n    if (aw == null) {\n      aw = new ArrayWritable(TypedBytesWritable.class);\n    } else if (!aw.getValueClass().equals(TypedBytesWritable.class)) {\n      throw new RuntimeException(\"value class has to be TypedBytesWritable\");\n    }\n    int length = in.readVectorHeader();\n    Writable[] writables = new Writable[length];\n    for (int i = 0; i < length; i++) {\n      writables[i] = new TypedBytesWritable(in.readRaw());\n    }\n    aw.set(writables);\n    return aw;\n  }\n\n  public ArrayWritable readArray() throws IOException {\n    return readArray(null);\n  }\n\n  public MapWritable readMap(MapWritable mw) throws IOException {\n    if (mw == null) {\n      mw = new MapWritable();\n    }","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesWritableInput.java#L283-L319","documentation":"Error \"value class has to be TypedBytesWritable\" thrown in apache/hadoop.","triggerScenarios":"TypedBytesWritableInput.setValueClass is called with a class that does not extend TypedBytesWritable.","commonSituations":"See trigger scenarios.","solutions":["Set the map output value class to TypedBytesWritable for this input format."],"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"}