rdblue commented on a change in pull request #4393:
URL: https://github.com/apache/iceberg/pull/4393#discussion_r836569501



##########
File path: 
aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java
##########
@@ -44,10 +48,27 @@
   private long next = 0;
   private boolean closed = false;
 
+  private final Counter<Long> readBytes;
+  private final Counter<Integer> readOperations;
+
   public OSSInputStream(OSS client, OSSURI uri) {
     this.client = client;
     this.uri = uri;
     this.createStack = Thread.currentThread().getStackTrace();
+
+    this.readBytes = MetricsContext.nullMetrics().counter(
+        FileIOMetricsContext.READ_BYTES, Long.class, Unit.BYTES);
+    this.readOperations = MetricsContext.nullMetrics().counter(
+        FileIOMetricsContext.READ_OPERATIONS, Integer.class, Unit.COUNT);

Review comment:
       Can this constructor call `this(client, uri, 
MetricsContext.nullMetrics());` instead?




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