rdblue commented on a change in pull request #4050:
URL: https://github.com/apache/iceberg/pull/4050#discussion_r804177127
##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3InputStream.java
##########
@@ -46,17 +48,23 @@
private long next = 0;
private boolean closed = false;
+ private final Counter<Long> readBytes;
+ private final Counter<Integer> readOperations;
+
private int skipSize = 1024 * 1024;
S3InputStream(S3Client s3, S3URI location) {
- this(s3, location, new AwsProperties());
+ this(s3, location, new AwsProperties(), FileIOMetrics.nullMetrics());
}
- S3InputStream(S3Client s3, S3URI location, AwsProperties awsProperties) {
+ S3InputStream(S3Client s3, S3URI location, AwsProperties awsProperties,
FileIOMetrics metrics) {
this.s3 = s3;
this.location = location;
this.awsProperties = awsProperties;
+ readBytes = metrics.counter(FileIOMetrics.READ_BYTES, Long.class);
+ readOperations = metrics.counter(FileIOMetrics.READ_BYTES, Integer.class);
Review comment:
Should be `this.readOperations` since it sets an instance field.
--
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]