ChenSammi commented on code in PR #6455:
URL: https://github.com/apache/ozone/pull/6455#discussion_r1596246097
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java:
##########
@@ -104,6 +105,7 @@ public class BlockOutputStream extends OutputStream {
private int chunkIndex;
private final AtomicLong chunkOffset = new AtomicLong();
private final BufferPool bufferPool;
+ private final DirectBufferPool directBufferPool;
Review Comment:
@ashishkumar50 , I would suggest reuse the directBufferPool in one Ozone
client. Direct buffer allocation is expensive, one buffer allocated in one
OutputStream can be reused by another OutputStream. The simple solution is
declare this as a stack field,
```
private static final DirectBufferPool directBufferPool = new
DirectBufferPool();
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]