saihemanth-cloudera commented on code in PR #5991: URL: https://github.com/apache/hive/pull/5991#discussion_r2261099933
########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionManagementTask.java: ########## @@ -91,43 +91,46 @@ public void run() { String qualifiedTableName = null; IMetaStoreClient msc = null; try { - msc = new HiveMetaStoreClient(conf); - String catalogName = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.PARTITION_MANAGEMENT_CATALOG_NAME); - String dbPattern = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.PARTITION_MANAGEMENT_DATABASE_PATTERN); - String tablePattern = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.PARTITION_MANAGEMENT_TABLE_PATTERN); - String tableTypes = MetastoreConf.getVar(conf, MetastoreConf.ConfVars.PARTITION_MANAGEMENT_TABLE_TYPES); - List<TableName> candidates = - new TableFetcher.Builder(msc, catalogName, dbPattern, tablePattern).tableTypes(tableTypes) - .tableCondition( - hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS + "discover__partitions like \"true\" ") - .build() - .getTables(); - - if (candidates.isEmpty()) { - LOG.info("Got empty table list in catalog: {}, dbPattern: {}", catalogName, dbPattern); - return; + if (MetastoreConf.getTimeVar(conf, MetastoreConf.ConfVars.PARTITION_MANAGEMENT_TASK_FREQUENCY, Review Comment: The test directly runs partitionManagementTask.run() which directly comes here, so this condition is required for the test to run successfully. The other condition is used by housekeeping tasks that are run periodically. I can go ahead and remove the additional condition in HouseKeepingTasks class as we already have it here. Please let me know. Thanks. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org