rajdchak commented on code in PR #7763:
URL: https://github.com/apache/hadoop/pull/7763#discussion_r2166857644


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/streams/AnalyticsStream.java:
##########
@@ -63,13 +64,21 @@ public AnalyticsStream(final ObjectReadParameters 
parameters,
   @Override
   public int read() throws IOException {
     throwIfClosed();
+    long pos = getPos();
+    getS3AStreamStatistics().readOperationStarted(pos, 1);
+
     int bytesRead;
     try {
       bytesRead = inputStream.read();
     } catch (IOException ioe) {
       onReadFailure(ioe);
       throw ioe;
     }
+
+    if (bytesRead != -1) {
+      getS3AStreamStatistics().bytesRead(1);

Review Comment:
   why are we updating bytesRead as 1 shouldn't this be bytesRead? what does 
this stat signify?



-- 
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: common-issues-unsubscr...@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to