abstractdog commented on code in PR #544:
URL: https://github.com/apache/tez/pull/544#discussion_r4346283273
##########
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/IFile.java:
##########
@@ -261,6 +263,8 @@ public Path getOutputPath() {
@InterfaceStability.Unstable
@SuppressWarnings({"unchecked", "rawtypes"})
public static class Writer {
+ private static final int WRITE_BUFFER_SIZE = 64 * 1024;
Review Comment:
possible follow-up: use initial size of 4 * 1024 and grow until 64 * 1024
##########
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/sort/impl/IFile.java:
##########
@@ -634,6 +650,52 @@ public long getCompressedLength() {
}
}
+ /** {@link java.io.BufferedOutputStream} without its per-call lock. */
+ private static final class WriteBuffer extends FilterOutputStream {
Review Comment:
maybe add unit tests the exercise 3 different paths:
1. single 64KB write
2. single `> 64KB` write
3. 63 KB + 2 KB writes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]