add filenameBase to log when exceed file size limit to indicate which column it is (#3982)

This commit is contained in:
kaijianding 2017-03-02 05:05:07 +08:00 committed by Slim
parent 16bf62bacc
commit 772de66e79
1 changed files with 6 additions and 3 deletions

View File

@ -198,7 +198,9 @@ public class GenericIndexedWriter<T> implements Closeable
headerOut.getCount()
);
Preconditions.checkState(
numBytesWritten < fileSizeLimit, "Wrote[%s] bytes, which is too many.", numBytesWritten
numBytesWritten < fileSizeLimit, "Wrote[%s] bytes to base file %s, which is too many.",
numBytesWritten,
filenameBase
);
try (OutputStream metaOut = ioPeon.makeOutputStream(makeFilename("meta"))) {
@ -221,8 +223,9 @@ public class GenericIndexedWriter<T> implements Closeable
);
Preconditions.checkState(
headerOutLong.getCount() < (Integer.MAX_VALUE & ~PAGE_SIZE),
"Wrote[%s] bytes in header file, which is too many.",
headerOutLong.getCount()
"Wrote[%s] bytes in header file of base file %s, which is too many.",
headerOutLong.getCount(),
filenameBase
);
}