apache/hadoop · error · IOException
Writing more bytes than advertised size.
Error message
Writing more bytes than advertised size.
What it means
Error "Writing more bytes than advertised size." thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Chunk.java:390
* @param size
* The total # of bytes to be written as a single chunk.
* @throws java.io.IOException
* if an I/O error occurs.
*/
public SingleChunkEncoder(DataOutputStream out, int size)
throws IOException {
this.out = out;
this.remain = size;
Utils.writeVInt(out, size);
}
@Override
public void write(int b) throws IOException {
if (remain > 0) {
out.write(b);
--remain;
} else {
throw new IOException("Writing more bytes than advertised size.");
}
}
@Override
public void write(byte b[]) throws IOException {
write(b, 0, b.length);
}
@Override
public void write(byte b[], int off, int len) throws IOException {
if (remain >= len) {
out.write(b, off, len);
remain -= len;
} else {
throw new IOException("Writing more bytes than advertised size.");
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Write no more bytes than the size advertised when the chunk/appender was created; track bytes written per entry.
When it happens
Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/Chunk.java:390 when the library encounters an invalid state.
Common situations: Occurs when more bytes are written to a chunk than the advertised chunk size. Track bytes written and do not exceed the declared size.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/661eb695b4b001a3.
Report an issue: GitHub.