zuston commented on code in PR #744:
URL: https://github.com/apache/incubator-uniffle/pull/744#discussion_r1142839210
##########
storage/src/main/java/org/apache/uniffle/storage/handler/impl/PooledHdfsShuffleWriteHandler.java:
##########
@@ -80,13 +89,13 @@ public void write(List<ShufflePartitionedBlock>
shuffleBlocks) throws Exception
if (queue.isEmpty()) {
LOGGER.warn("No free hdfs writer handler, it will wait. storage path:
{}", basePath);
}
- HdfsShuffleWriteHandler writeHandler = queue.take();
+ ShuffleWriteHandler writeHandler = queue.take();
try {
writeHandler.write(shuffleBlocks);
} finally {
- // Use add() here because we are sure the capacity will not be exceeded.
- // Note: add() throws IllegalStateException when queue is full.
- queue.add(writeHandler);
+ // Use addFirst() here because we are sure the capacity will not be
exceeded.
Review Comment:
Done. Add the javadoc for this class.
--
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]