[
https://issues.apache.org/jira/browse/PHOENIX-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793537#comment-17793537
]
ASF GitHub Bot commented on PHOENIX-7111:
-----------------------------------------
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.
> Metrics for server-side metadata cache
> --------------------------------------
>
> Key: PHOENIX-7111
> URL: https://issues.apache.org/jira/browse/PHOENIX-7111
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Palash Chauhan
> Assignee: Palash Chauhan
> Priority: Major
>
> Add metrics for monitoring the new metadata caching design.
> # Time taken to invalidate cache on all region servers during a DDL operation
> # Number of failed DDL operations due to failure in cache invalidation
> # Number of validateLastDDLTimestamp requests per region-server
> # Cache hits/misses per region-server when validating timestamps
--
This message was sent by Atlassian Jira
(v8.20.10#820010)