hudi-agent commented on code in PR #18685: URL: https://github.com/apache/hudi/pull/18685#discussion_r3179076517
########## hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/metrics/FlinkRLIBootstrapMetrics.java: ########## @@ -0,0 +1,61 @@ +/* + * 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.hudi.metrics; + +import org.apache.flink.metrics.Gauge; +import org.apache.flink.metrics.MetricGroup; + +/** + * Metrics for {@link org.apache.hudi.sink.bootstrap.RLIBootstrapOperator}. + * + * <p>Exposes gauges that are updated once after the bootstrap loading completes. + */ +public class FlinkRLIBootstrapMetrics extends HoodieFlinkMetrics { + + public static final String NUM_FILE_SLICES_PROCESSED = "rliBootstrap.numFileSlicesProcessed"; + public static final String NUM_INDEX_RECORDS_EMITTED = "rliBootstrap.numIndexRecordsEmitted"; + public static final String BOOTSTRAP_COST_MS = "rliBootstrap.bootstrapCostMs"; + public static final String BOOTSTRAP_THROUGHPUT = "rliBootstrap.bootstrapThroughput"; + + private long numFileSlicesProcessed; Review Comment: 🤖 nit: unlike `BOOTSTRAP_COST_MS` (which bakes the unit into the name), `BOOTSTRAP_THROUGHPUT` leaves the unit implicit — a user grafting on this gauge would have to dig into `getThroughput()` to discover it's records/second. Could you rename to `BOOTSTRAP_THROUGHPUT_RECS_PER_SEC` (and update the metric key string to match) for consistency with the milliseconds precedent? <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub> -- 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]
