You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/07/28 17:18:27 UTC

[GitHub] [ozone] umamaheswararao commented on a diff in pull request #3625: HDDS-7048. : EC: Add debug logging with exception info when stripe wr…

umamaheswararao commented on code in PR #3625:
URL: https://github.com/apache/ozone/pull/3625#discussion_r932493805


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java:
##########
@@ -203,6 +207,27 @@ private void encodeAndWriteParityCells() throws IOException {
     }
   }
 
+  private void logStreamError(List<ECBlockOutputStream> failedStreams,
+                              String operation) {

Review Comment:
   why do we need to collect into map? is there a way to collect into set? seems like we have not used values right?



##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECKeyOutputStream.java:
##########
@@ -203,6 +207,27 @@ private void encodeAndWriteParityCells() throws IOException {
     }
   }
 
+  private void logStreamError(List<ECBlockOutputStream> failedStreams,
+                              String operation) {
+    Map<Integer, ECBlockOutputStream> failedStreamIndexMap =
+            failedStreams.stream()
+                    .collect(Collectors.toMap(
+                            ECBlockOutputStream::getReplicationIndex,
+                            Function.identity()));
+
+    String failedStreamsString = IntStream.range(1,
+                    numDataBlks + numParityBlks + 1)
+            .mapToObj(index -> failedStreamIndexMap.containsKey(index)

Review Comment:
   change P -> S . meaning "Success"



-- 
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@ozone.apache.org

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


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