tisonkun commented on code in PR #5422:
URL: https://github.com/apache/opendal/pull/5422#discussion_r1889536401
##########
bindings/java/src/main/java/org/apache/opendal/OperatorOutputStream.java:
##########
@@ -35,31 +35,38 @@ protected void disposeInternal(long handle) {
}
}
- private static final int MAX_BYTES = 16384;
+ private static final int DEFAULT_MAX_BYTES = 16384;
private final Writer writer;
- private final byte[] bytes = new byte[MAX_BYTES];
+ private final byte[] bytes;
+ private final int maxBytes;
private int offset = 0;
public OperatorOutputStream(Operator operator, String path) {
+ this(operator, path, DEFAULT_MAX_BYTES);
+ }
+
+ public OperatorOutputStream(Operator operator, String path, int maxBytes) {
final long op = operator.nativeHandle;
this.writer = new Writer(constructWriter(op, path));
+ this.maxBytes = maxBytes;
+ this.bytes = new byte[maxBytes];
Review Comment:
> The other is the Rust core-side chunk, which buffers user input.
Could you point out the related code or examples? We may do this in a
follow-up PR.
--
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]