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 2021/08/27 12:03:56 UTC

[GitHub] [ozone] sodonnel commented on a change in pull request #2455: HDDS-5470 : EC: Add padding and generate parity if the last stripe is not full

sodonnel commented on a change in pull request #2455:
URL: https://github.com/apache/ozone/pull/2455#discussion_r697386195



##########
File path: hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockOutputStreamEntryPool.java
##########
@@ -100,16 +101,14 @@ void addKeyLocationInfo(OmKeyLocationInfo subKeyInfo) {
     return locationInfoList;
   }
 
+  @Override
   long getKeyLength() {
     long totalLength = getStreamEntries().stream().filter(c -> {
-      return (c.getPipeline().getReplicaIndex(
-          c.getPipeline().getNodes().iterator()
-              .next())) <= ecReplicationConfig.getData();
+      return (!((ECBlockOutputStreamEntry) c).isParityStreamEntry());

Review comment:
       Nit: I don't think you need the "return" keywork here. You can just have `c -> { boolean_expression }`




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