virajjasani commented on code in PR #6868:
URL: https://github.com/apache/hbase/pull/6868#discussion_r2167218702


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ScanMetrics.java:
##########
@@ -95,9 +95,17 @@ public class ScanMetrics extends ServerSideScanMetrics {
    */
   public final AtomicLong countOfRemoteRPCRetries = 
createCounter(REMOTE_RPC_RETRIES_METRIC_NAME);
 
-  /**
-   * constructor
-   */
-  public ScanMetrics() {

Review Comment:
   restore the constructor



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ScanMetricsRegionInfo.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.hbase.client.metrics;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.yetus.audience.InterfaceAudience;
+
+/**
+ * POJO for capturing region level details when region level scan metrics are 
enabled. <br>
+ * <br>
+ * Currently, encoded region name and server name (host name, ports and 
startcode) are captured as
+ * region details. <br>
+ * <br>
+ * Instance of this class serves as key in the Map returned by
+ * {@link ServerSideScanMetrics#collectMetricsByRegion()} or
+ * {@link ServerSideScanMetrics#collectMetricsByRegion(boolean)}.
+ */
[email protected]
+public class ScanMetricsRegionInfo {

Review Comment:
   While we are not expecting much changes, until we have gained more 
confidence after prod use, let's also add `@InterfaceStability.Evolving`



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/metrics/ScanMetricsUtil.java:
##########
@@ -0,0 +1,80 @@
+/*
+ * 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.hbase.client.metrics;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicLong;
+import org.apache.yetus.audience.InterfaceAudience;
+
[email protected]
+public final class ScanMetricsUtil {
+
+  private ScanMetricsUtil() {
+  }
+
+  /**
+   * Creates a new counter with the specified name and stores it in the 
counters map.
+   * @return {@link AtomicLong} instance for the counter with counterName
+   */
+  static AtomicLong createCounter(Map<String, AtomicLong> counters, String 
counterName) {

Review Comment:
   This is sort of mix of comments and Javadoc, let's convert all method 
comments into Javadocs



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

Reply via email to