Galsza commented on code in PR #3788: URL: https://github.com/apache/ozone/pull/3788#discussion_r995393328
########## hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OnDemandScannerMetrics.java: ########## @@ -0,0 +1,42 @@ +/* + * 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.hadoop.ozone.container.ozoneimpl; + +import org.apache.hadoop.hdds.annotation.InterfaceAudience; +import org.apache.hadoop.metrics2.MetricsSystem; +import org.apache.hadoop.metrics2.annotation.Metrics; +import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; + +/** + * This class captures the on-demand container data scanner metrics. + **/ [email protected] +@Metrics(about = "On-demand container data scanner metrics", context = "dfs") +public final class OnDemandScannerMetrics + extends AbstractContainerScannerMetrics { Review Comment: Yes, I'm aware of this, and it comes from how the OnDemandScanner is a bit different to the scheduled/offline scanners. In a perfect world, AbstractContainerScanner could be used for the OnDemandScanner as well, but I didn't know in advance how much the OnDemandScanner would differ from offline scanners, and deemed that trying to fit it into the AbstractContainerScanner would result in wasted effort for now. A side effect of this is that there is a slight code duplication with ContainerDataScanner as well, where the main scanning method is almost the same as the one in OnDemandScanner. -- 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]
