jackjlli commented on a change in pull request #6622:
URL: https://github.com/apache/incubator-pinot/pull/6622#discussion_r584381012
##########
File path:
pinot-spi/src/main/java/org/apache/pinot/spi/metrics/PinotMetricName.java
##########
@@ -23,5 +23,20 @@
*/
public interface PinotMetricName {
+ /**
+ * Returns the actual metric name.
+ */
Object getMetricName();
+
+ /**
+ * Overrides the equals method. This is needed as {@link PinotMetricName} is
used as the key of the key-value pair
+ * inside the hashmap in MetricsRegistry. Without overriding equals and
hashCode method, all the existing k-v pairs
+ * stored in hashmap cannot be retrieved by initializing a new key.
+ */
+ boolean equals(Object obj);
+
+ /**
+ * Overrides the hashCode method.
+ */
+ int hashCode();
Review comment:
updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]