palashc commented on code in PR #1744:
URL: https://github.com/apache/phoenix/pull/1744#discussion_r1416823076


##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/metrics/MetricsMetadataCachingSource.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * 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.phoenix.coprocessor.metrics;
+
+import org.apache.hadoop.hbase.metrics.BaseSource;
+
+/**
+ * Interface for metrics about Distributed Metadata Caching
+ */
+public interface MetricsMetadataCachingSource extends BaseSource {
+    // Metrics2 and JMX constants
+    String METRICS_NAME = "MetadataCaching";
+    String METRICS_CONTEXT = "phoenix";
+    String METRICS_DESCRIPTION = "Metrics about Distributed Metadata Caching";
+    String METRICS_JMX_CONTEXT = "RegionServer,sub=" + METRICS_NAME;
+
+    String METADATA_VALIDATION_CACHE_HIT = "metadataValidationCacheHits";
+    String METADATA_VALIDATION_CACHE_HIT_DESC
+            = "Number of cache hits in PhoenixRegionServerEndpoint "
+                + "when serving validate ddl timestamp requests.";
+
+    String METADATA_VALIDATION_CACHE_MISS = "metadataValidationCacheMisses";
+    String METADATA_VALIDATION_CACHE_MISS_DESC
+            = "Number of cache misses in PhoenixRegionServerEndpoint "
+                + "when serving validate ddl timestamp requests.";
+
+    String VALIDATE_DDL_TIMESTAMP_REQUESTS = "validateDDLTimestampRequests";
+    String VALIDATE_DDL_TIMESTAMP_REQUEST_DESC = "Number of validate ddl 
timestamp requests.";
+
+    String CACHE_INVALIDATION_OPERATIONS = "cacheInvalidationOperations";

Review Comment:
   @shahrs87 I am using this metric to track how many DDL operations (as a 
whole) were performed which needed cache invalidations on region servers, not 
individual cache invalidation RPCs. Let me know if the name then makes sense. 



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