deniskuzZ commented on code in PR #3822:
URL: https://github.com/apache/hive/pull/3822#discussion_r1060426315
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSMetricsListener.java:
##########
@@ -99,15 +103,21 @@ public void onAddPartition(AddPartitionEvent
partitionEvent) throws MetaExceptio
public void onAllocWriteId(AllocWriteIdEvent allocWriteIdEvent, Connection
dbConn, SQLGenerator sqlGenerator) throws MetaException {
if (MetastoreConf.getBoolVar(getConf(),
MetastoreConf.ConfVars.METASTORE_ACIDMETRICS_EXT_ON)) {
Table table = getTable(allocWriteIdEvent);
- // In the case of CTAS, the table is created after write ids are
allocated, so we'll skip metrics collection.
- if (table != null &&
MetaStoreUtils.isNoAutoCompactSet(table.getParameters())) {
- int noAutoCompactSet =
-
Metrics.getOrCreateGauge(MetricsConstants.WRITES_TO_DISABLED_COMPACTION_TABLE).incrementAndGet();
- if (noAutoCompactSet >=
- MetastoreConf.getIntVar(getConf(),
-
MetastoreConf.ConfVars.COMPACTOR_NUMBER_OF_DISABLED_COMPACTION_TABLES_THRESHOLD))
{
- LOGGER.warn("There has been a write to table " + table.getDbName() +
"." + table.getTableName() +
- " where auto-compaction is disabled (tblproperties
(\"no_auto_compact\"=\"true\")).");
+ if (table != null) {
Review Comment:
why is this change? it looks unreleated
--
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]