This is an automated email from the ASF dual-hosted git repository. jlli pushed a commit to branch remove-redundant-metrics in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 1b4f8c2cf471af72f1f6d9fe612140773469ed37 Author: jackjlli <[email protected]> AuthorDate: Mon Oct 14 23:18:37 2019 -0700 Clean up metrics --- .../pinot/broker/api/resources/PinotClientRequest.java | 6 +++--- .../java/org/apache/pinot/common/metrics/BrokerMeter.java | 4 ---- .../org/apache/pinot/common/metrics/ControllerGauge.java | 9 --------- .../org/apache/pinot/common/metrics/ControllerMeter.java | 12 ------------ .../java/org/apache/pinot/common/metrics/ServerGauge.java | 5 ----- .../org/apache/pinot/controller/LeadControllerManager.java | 2 -- 6 files changed, 3 insertions(+), 35 deletions(-) diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java b/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java index 09c92c6..bb4cec4 100644 --- a/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java +++ b/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java @@ -82,7 +82,7 @@ public class PinotClientRequest { return brokerResponse.toJsonString(); } catch (Exception e) { LOGGER.error("Caught exception while processing GET request", e); - brokerMetrics.addMeteredGlobalValue(BrokerMeter.UNCAUGHT_GET_EXCEPTIONS, 1); + brokerMetrics.addMeteredGlobalValue(BrokerMeter.UNCAUGHT_GET_EXCEPTIONS, 1L); throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } } @@ -98,8 +98,8 @@ public class PinotClientRequest { BrokerResponse brokerResponse = requestHandler.handleRequest(requestJson, null, new RequestStatistics()); return brokerResponse.toJsonString(); } catch (Exception e) { - LOGGER.error("Caught exception while processing GET request", e); - brokerMetrics.addMeteredGlobalValue(BrokerMeter.UNCAUGHT_GET_EXCEPTIONS, 1); + LOGGER.error("Caught exception while processing POST request", e); + brokerMetrics.addMeteredGlobalValue(BrokerMeter.UNCAUGHT_POST_EXCEPTIONS, 1L); throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } } diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/BrokerMeter.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/BrokerMeter.java index 170e745..95b22dd 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/BrokerMeter.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/BrokerMeter.java @@ -79,10 +79,6 @@ public enum BrokerMeter implements AbstractMetrics.Meter { REQUEST_DROPPED_DUE_TO_ACCESS_ERROR("requestsDropped", false), - // Number of queries served by LLC and HLC routing tables - LLC_QUERY_COUNT("queries", false), - HLC_QUERY_COUNT("queries", false), - ROUTING_TABLE_REBUILD_FAILURES("failures", false), GROUP_BY_SIZE("queries", false), diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java index 1fca8be..0eb1fd6 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerGauge.java @@ -48,21 +48,12 @@ public enum ControllerGauge implements AbstractMetrics.Gauge { // Pinot controller leader PINOT_CONTROLLER_LEADER("PinotControllerLeader", true), - // Pinot controller partition leader - PINOT_CONTROLLER_PARTITION_LEADER("PinotControllerPartitionLeader", true), - // Pinot controller resource enabled PINOT_LEAD_CONTROLLER_RESOURCE_ENABLED("PinotLeadControllerResourceEnabled", true), // Number of partitions for which current controller becomes the leader CONTROLLER_LEADER_PARTITION_COUNT("ControllerLeaderPartitionCount", true), - // Number of extra live instances needed - SHORT_OF_LIVE_INSTANCES("ShortOfLiveInstances", false), - - // Estimated size of realtime table - REALTIME_TABLE_ESTIMATED_SIZE("RealtimeTableEstimatedSize", false), - // Estimated size of offline table OFFLINE_TABLE_ESTIMATED_SIZE("OfflineTableEstimatedSize", false), diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java index f66279d..5ab9903 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java @@ -26,32 +26,20 @@ import org.apache.pinot.common.Utils; */ public enum ControllerMeter implements AbstractMetrics.Meter { HELIX_ZOOKEEPER_RECONNECTS("reconnects", true), - CONTROLLER_INTERNAL_ERROR("InternalError", true), - CONTROLLER_INSTANCE_GET_ERROR("InstanceGetError", true), CONTROLLER_INSTANCE_POST_ERROR("InstancePostError", true), CONTROLLER_INSTANCE_DELETE_ERROR("InstanceDeleteError", true), - CONTROLLER_SEGMENT_GET_ERROR("SegmentGetError", true), - CONTROLLER_SEGMENT_DELETE_ERROR("SegmentDeleteError", true), CONTROLLER_SEGMENT_UPLOAD_ERROR("SegmentUploadError", true), - CONTROLLER_SCHEMA_GET_ERROR("SchemaGetError", true), - CONTROLLER_SCHEMA_DELETE_ERROR("SchemaDeleteError", true), CONTROLLER_SCHEMA_UPLOAD_ERROR("SchemaUploadError", true), - CONTROLLER_TABLE_INDEXING_GET_ERROR("TableIndexingGetError", true), - CONTROLLER_TABLE_INSTANCES_GET_ERROR("TableInstancesGetError", true), CONTROLLER_TABLE_ADD_ERROR("TableAddError", true), - CONTROLLER_TABLE_GET_ERROR("TableGetError", true), CONTROLLER_TABLE_UPDATE_ERROR("TableUpdateError", true), - CONTROLLER_TABLE_SCHEMA_GET_ERROR("TableSchemaGetError", true), CONTROLLER_TABLE_SCHEMA_UPDATE_ERROR("TableSchemaUpdateError", true), CONTROLLER_TABLE_TENANT_UPDATE_ERROR("TableTenantUpdateError", true), CONTROLLER_TABLE_TENANT_CREATE_ERROR("TableTenantCreateError", true), CONTROLLER_TABLE_TENANT_DELETE_ERROR("TableTenantDeleteError", true), - CONTROLLER_TABLE_TENANT_GET_ERROR("TableTenantGetError", true), CONTROLLER_REALTIME_TABLE_SEGMENT_ASSIGNMENT_ERROR("errors", true), CONTROLLER_NOT_LEADER("notLeader", true), CONTROLLER_LEADERSHIP_CHANGE_WITHOUT_CALLBACK("leadershipChangeWithoutCallback", true), LLC_STATE_MACHINE_ABORTS("aborts", false), - LLC_AUTO_CREATED_PARTITIONS("creates", false), LLC_ZOOKEEPER_UPDATE_FAILURES("failures", false), LLC_KAFKA_DATA_LOSS("dataLoss", false), // Introducing a new stream agnostic metric to replace LLC_KAFKA_DATA_LOSS. diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerGauge.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerGauge.java index aff0c83..d739c0f 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerGauge.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ServerGauge.java @@ -38,12 +38,7 @@ public enum ServerGauge implements AbstractMetrics.Gauge { LAST_REALTIME_SEGMENT_INITIAL_CONSUMPTION_DURATION_SECONDS("seconds", false), LAST_REALTIME_SEGMENT_CATCHUP_DURATION_SECONDS("seconds", false), LAST_REALTIME_SEGMENT_COMPLETION_DURATION_SECONDS("seconds", false), - KAFKA_PARTITION_OFFSET_LAG("messages", false), - // Introducing a new stream agnostic metric to replace KAFKA_PARTITION_OFFSET_LAG. - // We can phase out KAFKA_PARTITION_OFFSET_LAG once we have collected sufficient metrics for the new one - STREAM_PARTITION_OFFSET_LAG("messages", false), REALTIME_OFFHEAP_MEMORY_USED("bytes", false), - RUNNING_QUERIES("runningQueries", false), REALTIME_SEGMENT_NUM_PARTITIONS("realtimeSegmentNumPartitions", false), LLC_SIMULTANEOUS_SEGMENT_BUILDS("llcSimultaneousSegmentBuilds", true); diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/LeadControllerManager.java b/pinot-controller/src/main/java/org/apache/pinot/controller/LeadControllerManager.java index c39ef4b..767ab8f 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/LeadControllerManager.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/LeadControllerManager.java @@ -118,7 +118,6 @@ public class LeadControllerManager { LOGGER.info("Add Partition: {} to LeadControllerManager", partitionName); int partitionId = LeadControllerUtils.extractPartitionId(partitionName); _leadForPartitions.add(partitionId); - _controllerMetrics.setValueOfGlobalGauge(ControllerGauge.PINOT_CONTROLLER_PARTITION_LEADER, partitionName, 1L); _controllerMetrics .setValueOfGlobalGauge(ControllerGauge.CONTROLLER_LEADER_PARTITION_COUNT, _leadForPartitions.size()); } @@ -131,7 +130,6 @@ public class LeadControllerManager { LOGGER.info("Remove Partition: {} from LeadControllerManager", partitionName); int partitionId = LeadControllerUtils.extractPartitionId(partitionName); _leadForPartitions.remove(partitionId); - _controllerMetrics.setValueOfGlobalGauge(ControllerGauge.PINOT_CONTROLLER_PARTITION_LEADER, partitionName, 0L); _controllerMetrics .setValueOfGlobalGauge(ControllerGauge.CONTROLLER_LEADER_PARTITION_COUNT, _leadForPartitions.size()); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
