DanielZhu58 commented on code in PR #6438:
URL: https://github.com/apache/hive/pull/6438#discussion_r3226112251
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java:
##########
@@ -1291,6 +1291,22 @@ public enum ConfVars {
"metastore.partition.management.table.pattern", "*",
"Automatic partition management will look for tables using the specified
table pattern"),
+
COLUMN_STATISTICS_MANAGEMENT_TASK_FREQUENCY("metastore.column.statistics.management.task.frequency",
+ "metastore.column.statistics.management.task.frequency",
+ 7, TimeUnit.DAYS, "Frequency at which timer task runs to do
automatic statistics \n" +
+ "management for tables. Statistics management include 2 configs.
\n" +
+ "One is 'metastore.column.statistics.auto.deletion', and the other
is 'metastore.column.statistics.retention.period'. \n" +
+ "When 'metastore.column.statistics.auto.deletion'='true' is set,
statistics management will look for tables which their\n" +
+ "column statistics are over the retention period, and then delete
the column stats. \n"),
+
+
COLUMN_STATISTICS_RETENTION_PERIOD("metastore.column.statistics.retention.period",
+ "metastore.column.statistics.retention.period", 365,
TimeUnit.DAYS, "The retention period " +
+ "that we want to keep the stats for each table, which means if the
stats are older than this period\n" +
+ "of time, the stats will be automatically deleted. \n"),
+
+
COLUMN_STATISTICS_AUTO_DELETION("metastore.column.statistics.auto.deletion",
"metastore.column.statistics.auto.deletion", false,
Review Comment:
I think it's ok to keep COLUMN_STATISTICS_AUTO_DELETION. The two configs
have distinct responsibilities: the boolean controls whether the feature is
active at all, while the frequency controls how often it runs. Conflating them
makes the configuration less readable. It can gives users a simple toggle to
temporarily disable deletion without having to remember and restore their
frequency setting.
--
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]