dengzhhu653 commented on code in PR #5851:
URL: https://github.com/apache/hive/pull/5851#discussion_r2629138359
##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreMetrics.java:
##########
@@ -118,14 +118,15 @@ public void testMetaDataCounts() throws Exception {
Assert.assertEquals(1,
Metrics.getRegistry().getCounters().get(MetricsConstants.DELETE_TOTAL_DATABASES).getCount());
Assert.assertEquals(3,
Metrics.getRegistry().getCounters().get(MetricsConstants.DELETE_TOTAL_TABLES).getCount());
- Assert.assertEquals(3,
Metrics.getRegistry().getCounters().get(MetricsConstants.DELETE_TOTAL_PARTITIONS).getCount());
+ //skip counting the dropped partitions while dropping the database tempdb
+ Assert.assertEquals(1,
Metrics.getRegistry().getCounters().get(MetricsConstants.DELETE_TOTAL_PARTITIONS).getCount());
//to test initial metadata count metrics.
Assert.assertEquals(initDbCount + 1,
Metrics.getRegistry().getGauges().get(MetricsConstants.TOTAL_DATABASES).getValue());
Assert.assertEquals(initTblCount + 4,
Metrics.getRegistry().getGauges().get(MetricsConstants.TOTAL_TABLES).getValue());
- Assert.assertEquals(initPartCount + 6,
+ Assert.assertEquals(initPartCount + 8,
Review Comment:
on dropping the table, the new change doesn't decrease the
`TOTAL_PARTITIONS` any more:
https://github.com/apache/hive/pull/5851/files#diff-90c669c961ab250c01087a409b31126cce7ac0672c40f465e7ee262ed7bcdaddL3280
This `TOTAL_PARTITIONS` counter makes no sense to me if HMS is HA, and is
misleading.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]