You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org> on 2025/04/28 10:34:02 UTC

[PR] [metrics] Add io-metrics for paimon in Flink [paimon]

zhuanshenbsj1 opened a new pull request, #5550:
URL: https://github.com/apache/paimon/pull/5550

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   1. Monitor the input/output (IO) of Flink during read and write operations.
   2. Measure the time taken for read and write operations to effectively monitor whether the Paimon storage engine experiences performance issues.
   3. Monitor the occurrences of filesystem operations, including "ls", "delete", and so on.
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-4414038373

   This pull request has had no activity for 90 days. If you'd like to keep it open, please push a new commit or leave a comment. Thanks for the contribution.


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2083549112


##########
paimon-common/src/main/java/org/apache/paimon/fs/MetricsFileIO.java:
##########
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs;
+
+import org.apache.paimon.annotation.VisibleForTesting;
+import org.apache.paimon.catalog.CatalogContext;
+import org.apache.paimon.fs.metrics.InputMetrics;
+import org.apache.paimon.fs.metrics.OutputMetrics;
+
+import java.io.IOException;
+
+/**
+ * FileIOWrapper is a wrapper class for the {@link FileIO}.
+ *
+ * <p>It allows users to monitor and track file I/O operations (e.g., read, write, delete, rename).
+ */
+public class MetricsFileIO implements FileIO {
+
+    protected final FileIO fileIO;
+    protected InputMetrics inputMetrics = null;
+    protected OutputMetrics outputMetrics = null;
+
+    public MetricsFileIO(FileIO fileIO) {
+        this.fileIO = fileIO;
+    }
+
+    public MetricsFileIO withMetrics(InputMetrics inputMetrics, OutputMetrics outputMetrics) {
+        this.inputMetrics = inputMetrics;
+        this.outputMetrics = outputMetrics;
+        return this;
+    }
+
+    public FileIO getFileIOInternal() {
+        FileIO currentFileIO = fileIO;
+        while (currentFileIO instanceof MetricsFileIO) {
+            currentFileIO = ((MetricsFileIO) currentFileIO).fileIO;
+        }
+        return currentFileIO;
+    }
+
+    @VisibleForTesting
+    public Boolean isMetricsEnabled() {
+        return inputMetrics != null && outputMetrics != null;
+    }
+
+    @Override
+    public boolean isObjectStore() {
+        return fileIO.isObjectStore();
+    }
+
+    @Override
+    public void configure(CatalogContext context) {
+        fileIO.configure(context);
+    }
+
+    @Override
+    public SeekableInputStream newInputStream(Path path) throws IOException {
+        SeekableInputStream inputStream = fileIO.newInputStream(path);
+        return new SeekableInputStreamIOWrapper(inputStream, this.inputMetrics);

Review Comment:
   Please consider `SeekableInputStream` can be `VectoredReadable`.



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2083549194


##########
paimon-common/src/main/java/org/apache/paimon/fs/metrics/OutputMetrics.java:
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs.metrics;
+
+import org.apache.paimon.metrics.MetricGroup;
+import org.apache.paimon.metrics.MetricRegistry;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/** Collects and monitors outp stream metrics. */
+public class OutputMetrics {

Review Comment:
   Please merge these tow classes into one.



##########
paimon-common/src/main/java/org/apache/paimon/fs/metrics/OutputMetrics.java:
##########
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs.metrics;
+
+import org.apache.paimon.metrics.MetricGroup;
+import org.apache.paimon.metrics.MetricRegistry;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/** Collects and monitors outp stream metrics. */
+public class OutputMetrics {
+    public static final String GROUP_NAME = "sink";

Review Comment:
   group name should be `io`.



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2078849631


##########
paimon-common/pom.xml:
##########
@@ -198,6 +198,12 @@ under the License.
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math3</artifactId>

Review Comment:
   Please remove this dep



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079004761


##########
paimon-common/pom.xml:
##########
@@ -198,6 +198,12 @@ under the License.
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math3</artifactId>

Review Comment:
   I moved some metrics classes from the core to the common project, and the class DescriptiveStatisticsHistogram depends on this.
   
   `package org.apache.paimon.metrics;
   
   
   import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
   
   
   import java.io.Serializable;
   
   
   /**
    * The {@link DescriptiveStatisticsHistogram} use a {@link DescriptiveStatistics} as a Paimon {@link
    * Histogram}.
    */
   public class DescriptiveStatisticsHistogram implements Histogram, Serializable {`



##########
paimon-common/pom.xml:
##########
@@ -198,6 +198,12 @@ under the License.
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math3</artifactId>

Review Comment:
   I moved some metrics classes from the core to the common project, and the class DescriptiveStatisticsHistogram depends on this.
   
   `package org.apache.paimon.metrics;
   
   
   import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
   
   
   import java.io.Serializable;
   
   
   /**
    * The {@link DescriptiveStatisticsHistogram} use a {@link DescriptiveStatistics} as a Paimon {@link
    * Histogram}.
    */
   public class DescriptiveStatisticsHistogram implements Histogram, Serializable {`



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2078850911


##########
paimon-core/src/main/java/org/apache/paimon/table/AbstractFileStoreTable.java:
##########
@@ -104,7 +110,7 @@ protected AbstractFileStoreTable(
             Path path,
             TableSchema tableSchema,
             CatalogEnvironment catalogEnvironment) {
-        this.fileIO = fileIO;
+        this.fileIO = new FileIOWrapper(fileIO);

Review Comment:
   We may need to introduce an option to enable `MetricsFileIO`.



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079055828


##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIOWrapper.java:
##########
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs;
+
+import org.apache.paimon.catalog.CatalogContext;
+import org.apache.paimon.fs.metrics.InputMetrics;
+import org.apache.paimon.fs.metrics.OutputMetrics;
+
+import java.io.IOException;
+
+/**
+ * FileIOWrapper is a wrapper class for the {@link FileIO}.
+ *
+ * <p>It allows users to monitor and track file I/O operations (e.g., read, write, delete, rename).
+ */
+public class FileIOWrapper implements FileIO {

Review Comment:
   > `MetricsFileIO`?
   
   +1



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079007470


##########
paimon-common/pom.xml:
##########
@@ -198,6 +198,12 @@ under the License.
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-math3</artifactId>

Review Comment:
   > Please remove this dep
   
   I moved some metrics classes from paimon-core to paimon-common project,  and the class DescriptiveStatisticsHistogram depends on this.



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079700910


##########
paimon-common/src/main/java/org/apache/paimon/fs/metrics/InputMetrics.java:
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs.metrics;
+
+import org.apache.paimon.metrics.MetricGroup;
+import org.apache.paimon.metrics.MetricRegistry;
+
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicLong;
+
+/** Collects and monitors input stream metrics. */
+public class InputMetrics {
+
+    public static final String GROUP_NAME = "source";
+    private final MetricGroup metricGroup;
+
+    private final AtomicLong readBytes = new AtomicLong(0);

Review Comment:
   > only keep:
   > 
   > ```
   >   String READ_BYTES = "read.bytes";
   >   String READ_OPERATIONS = "read.operations";
   >   String WRITE_BYTES = "write.bytes";
   >   String WRITE_OPERATIONS = "write.operations";
   > ```
   
   Other metrics have been removed.



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2861856001

   I'v done refactor for making with MetricRegistry public in https://github.com/apache/paimon/pull/5578


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079696153


##########
paimon-core/src/main/java/org/apache/paimon/table/AbstractFileStoreTable.java:
##########
@@ -104,7 +110,7 @@ protected AbstractFileStoreTable(
             Path path,
             TableSchema tableSchema,
             CatalogEnvironment catalogEnvironment) {
-        this.fileIO = fileIO;
+        this.fileIO = new FileIOWrapper(fileIO);

Review Comment:
   Done
   
   > We may need to introduce an option to enable `MetricsFileIO`.
   
   



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2869825483

   > I'v done refactor for making with MetricRegistry public in #5578
   
   rebase on this && add uts & all checks passed,  cc~ @JingsongLi 


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "wwj6591812 (via GitHub)" <gi...@apache.org>.
wwj6591812 commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2838194219

   1、You add lots of metric, I suggest you sent the discuss email to dev@paimon.apache.org first.
   2、modify the doc.
   
   
   


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2863050817

   > I'v done refactor for making with MetricRegistry public in #5578
   
   +1


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2079055828


##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIOWrapper.java:
##########
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs;
+
+import org.apache.paimon.catalog.CatalogContext;
+import org.apache.paimon.fs.metrics.InputMetrics;
+import org.apache.paimon.fs.metrics.OutputMetrics;
+
+import java.io.IOException;
+
+/**
+ * FileIOWrapper is a wrapper class for the {@link FileIO}.
+ *
+ * <p>It allows users to monitor and track file I/O operations (e.g., read, write, delete, rename).
+ */
+public class FileIOWrapper implements FileIO {

Review Comment:
   > `MetricsFileIO`?
   
   +1



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed pull request #5550: [metrics] Add io-metrics for paimon in Flink
URL: https://github.com/apache/paimon/pull/5550


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2840591688

   > 1、You add lots of metric, I suggest you sent the discuss email to [dev@paimon.apache.org](mailto:dev@paimon.apache.org) first. 2、modify the doc.
   
   Roger that.


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on PR #5550:
URL: https://github.com/apache/paimon/pull/5550#issuecomment-2896890817

   @JingsongLi  Could you please take a look at this PR again for any remaining issues, thank ~


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2078850158


##########
paimon-common/src/main/java/org/apache/paimon/fs/metrics/InputMetrics.java:
##########
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs.metrics;
+
+import org.apache.paimon.metrics.MetricGroup;
+import org.apache.paimon.metrics.MetricRegistry;
+
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicLong;
+
+/** Collects and monitors input stream metrics. */
+public class InputMetrics {
+
+    public static final String GROUP_NAME = "source";
+    private final MetricGroup metricGroup;
+
+    private final AtomicLong readBytes = new AtomicLong(0);

Review Comment:
   only keep:
   ```
     String READ_BYTES = "read.bytes";
     String READ_OPERATIONS = "read.operations";
     String WRITE_BYTES = "write.bytes";
     String WRITE_OPERATIONS = "write.operations";
   ```



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [metrics] Add io-metrics for paimon in Flink [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5550:
URL: https://github.com/apache/paimon/pull/5550#discussion_r2078849846


##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIOWrapper.java:
##########
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.fs;
+
+import org.apache.paimon.catalog.CatalogContext;
+import org.apache.paimon.fs.metrics.InputMetrics;
+import org.apache.paimon.fs.metrics.OutputMetrics;
+
+import java.io.IOException;
+
+/**
+ * FileIOWrapper is a wrapper class for the {@link FileIO}.
+ *
+ * <p>It allows users to monitor and track file I/O operations (e.g., read, write, delete, rename).
+ */
+public class FileIOWrapper implements FileIO {

Review Comment:
   `MetricsFileIO`?



-- 
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: issues-unsubscribe@paimon.apache.org

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