HIVE-20248 : clean up some TODOs after txn stats merge (Sergey Shelukhin, reviewed by Eugene Koifman)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d4b7b93e Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d4b7b93e Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d4b7b93e Branch: refs/heads/master Commit: d4b7b93e27a8a28dde8f4584d883faba86f0203c Parents: 54b77a5 Author: sergey <[email protected]> Authored: Mon Jul 30 12:36:47 2018 -0700 Committer: sergey <[email protected]> Committed: Mon Jul 30 12:54:41 2018 -0700 ---------------------------------------------------------------------- .../test/org/apache/hadoop/hive/ql/TestTxnCommands.java | 1 - .../org/apache/hadoop/hive/metastore/ObjectStore.java | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/d4b7b93e/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java ---------------------------------------------------------------------- diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java index 3d4cb83..e9d9f9c 100644 --- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java +++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands.java @@ -394,7 +394,6 @@ public class TestTxnCommands extends TxnCommandsBaseForTests { verifyLongStats(3, 0, 1000, getTxnTableStats(msClient, tableName)); } - // TODO## this test is broken; would probably be fixed by HIVE-20046 @Test public void testParallelTruncateAnalyzeStats() throws Exception { String tableName = "mm_table"; http://git-wip-us.apache.org/repos/asf/hive/blob/d4b7b93e/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index e6f9acb..8af164e 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -1307,9 +1307,6 @@ public class ObjectStore implements RawStore, Configurable { TableName.getQualified(catName, dbName, tableName)); } - // TODO## remove? unused - Table table = convertToTable(tbl); - List<MConstraint> tabConstraints = listAllTableConstraintsWithOptionalConstraintName( catName, dbName, tableName, null); if (CollectionUtils.isNotEmpty(tabConstraints)) { @@ -8452,7 +8449,7 @@ public class ObjectStore implements RawStore, Configurable { // There is no need to add colname again, otherwise we will get duplicate colNames. } - // TODO## ideally the col stats stats should be in colstats, not in the table! + // TODO: (HIVE-20109) ideally the col stats stats should be in colstats, not in the table! // Set the table properties // No need to check again if it exists. String dbname = table.getDbName(); @@ -8552,7 +8549,7 @@ public class ObjectStore implements RawStore, Configurable { writeMPartitionColumnStatistics(table, partition, mStatsObj, oldStats.get(statsObj.getColName())); } - // TODO## ideally the col stats stats should be in colstats, not in the partition! + // TODO: (HIVE-20109) the col stats stats should be in colstats, not in the partition! Map<String, String> newParams = new HashMap<>(mPartition.getParameters()); StatsSetupConst.setColumnStatsState(newParams, colNames); boolean isTxn = TxnUtils.isTransactionalTable(table); @@ -8759,7 +8756,7 @@ public class ObjectStore implements RawStore, Configurable { cs.setIsStatsCompliant(false); } } else { - // TODO## this could be improved to get partitions in bulk + // TODO: this could be improved to get partitions in bulk for (ColumnStatistics cs : allStats) { MPartition mpart = getMPartition(catName, dbName, tableName, Warehouse.getPartValuesFromPartName(cs.getStatsDesc().getPartName())); @@ -12474,8 +12471,7 @@ public class ObjectStore implements RawStore, Configurable { boolean isCompleteStatsWriter) throws MetaException { // Note: can be changed to debug/info to verify the calls. - // TODO## change this to debug when merging - LOG.info("isCurrentStatsValidForTheQuery with stats write ID {}; query {}; writer: {} params {}", + LOG.debug("isCurrentStatsValidForTheQuery with stats write ID {}; query {}; writer: {} params {}", statsWriteId, queryValidWriteIdList, isCompleteStatsWriter, statsParams); // return true since the stats does not seem to be transactional. if (statsWriteId < 1) {
