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



##########
File path: 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockReconstructedStripeInputStream.java
##########
@@ -246,12 +246,19 @@ public synchronized int readStripe(ByteBuffer[] bufs) 
throws IOException {
         }
       }
     }
-    padBuffers(toRead);
-    flipInputs();
-    decodeStripe();
-    // Reset the buffer positions after padding to the read limits so the 
client
-    // reads the correct amount of data.
-    setBufferReadLimits(bufs, toRead);
+    if (missingIndexes.length > 0) {

Review comment:
       It will only be 0, if there are not any locations missing :)
   
   In the current design this will not happen, as it we have all locations we 
will use the ECBlockInputSteram, and never go near the reconstruction input 
streams. However I thought it was a good idea to test if this worked (and it 
did with no changes) and add this small optimisation.
   
   Later, I hope to performance test this class against the other one and see 
how they compare. Also, we may be able to get parallel reads by reading a 
stripe into one set of buffers, and then reading another stripe into a second 
set of buffers while the client receives data from the first set. Again, this 
is just an idea to experiment with later.
   
   It should also be somewhat simple to extend this class to read from all 
blocks in the stripe in parallel and test that performance too.
   
   So in summary, this is not something we plan on using at the moment, but its 
so simple to add now I feel we may as well do it and it may be useful later.




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

Reply via email to