beryllw commented on code in PR #2933: URL: https://github.com/apache/fluss/pull/2933#discussion_r3008559955
########## fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/tiering/source/metrics/TieringMetrics.java: ########## @@ -0,0 +1,68 @@ +/* + * 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.fluss.flink.tiering.source.metrics; + +import org.apache.fluss.annotation.Internal; +import org.apache.fluss.metrics.MetricNames; + +import org.apache.flink.metrics.Counter; +import org.apache.flink.metrics.MeterView; +import org.apache.flink.metrics.MetricGroup; +import org.apache.flink.metrics.groups.SourceReaderMetricGroup; + +/** + * A collection class for handling metrics in Tiering source reader. + * + * <p>All metrics are registered under group "fluss.tieringService", which is a child group of + * {@link org.apache.flink.metrics.groups.OperatorMetricGroup}. + * + * <p>The following metrics are available: + * + * <ul> + * <li>{@code fluss.tieringService.writtenBytes} - Counter: cumulative bytes written to the lake + * since the job started (physical file sizes). + * <li>{@code fluss.tieringService.writtenBytesPerSecond} - Meter: write bytes-per-second rate + * derived from the counter using a 60-second sliding window. + * </ul> + */ +@Internal +public class TieringMetrics { + + // Metric group names + public static final String FLUSS_METRIC_GROUP = "fluss"; + public static final String TIERING_SERVICE_GROUP = "tieringService"; + + private final Counter writtenBytesCounter; + + public TieringMetrics(SourceReaderMetricGroup sourceReaderMetricGroup) { Review Comment: Not quite the same. The tiering job keeps read and write in one operator (no shuffle), while Flink CDC introduces shuffle between the source and sink. -- 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]
