Ver código fonte

HADOOP-13723. AliyunOSSInputStream#read() should update read bytes stat correctly. Contributed by Mingliang Liu

Mingliang Liu 8 anos atrás
pai
commit
d9f73f1b7c

+ 1 - 1
hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSInputStream.java

@@ -123,7 +123,7 @@ public class AliyunOSSInputStream extends FSInputStream {
     }
 
     if (statistics != null && byteRead >= 0) {
-      statistics.incrementBytesRead(1);
+      statistics.incrementBytesRead(byteRead);
     }
     return byteRead;
   }