You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "zuston (via GitHub)" <gi...@apache.org> on 2023/03/21 02:33:43 UTC

[GitHub] [incubator-uniffle] zuston commented on a diff in pull request #744: [#736] feat(storage): best effort to write same hdfs file when no race condition

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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org