You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/10/23 14:59:55 UTC

[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #235: Write to hdfs when local disk can't be write

jerqi commented on code in PR #235:
URL: https://github.com/apache/incubator-uniffle/pull/235#discussion_r1002723836


##########
server/src/main/java/org/apache/uniffle/server/ShuffleDataFlushEvent.java:
##########
@@ -90,6 +92,14 @@ public ShuffleBuffer getShuffleBuffer() {
     return shuffleBuffer;
   }
 
+  public StorageManager getStorageManager() {

Review Comment:
   Why do we use storageManager as field?



##########
server/src/main/java/org/apache/uniffle/server/storage/SingleStorageManager.java:
##########
@@ -113,6 +115,22 @@ public void updateWriteMetrics(ShuffleDataFlushEvent event, long writeTime) {
     }
   }
 
+
+  @Override
+  public boolean canWrite(ShuffleDataFlushEvent event) {
+    try {
+      Storage storage = selectStorage(event);
+      // if storage is null, appId may not be registered
+      if (storage == null || !storage.canWrite()) {
+        return false;
+      }
+      return true;
+    } catch (Exception e) {
+      LOG.warn("", e);

Review Comment:
   ?



-- 
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