You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/12/03 10:20:26 UTC
[GitHub] [hive] deniskuzZ commented on a change in pull request #2837: HIVE-25716 Fix of flaky test TestCompactionMetrics#testOldestReadyForCleaningAge
deniskuzZ commented on a change in pull request #2837:
URL: https://github.com/apache/hive/pull/2837#discussion_r761811269
##########
File path: ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCompactionMetrics.java
##########
@@ -178,41 +178,44 @@ public void testInitiatorPerfMetricsDisabled() throws Exception {
}
@Test
- @org.junit.Ignore("HIVE-25716")
public void testOldestReadyForCleaningAge() throws Exception {
conf.setIntVar(HiveConf.ConfVars.COMPACTOR_MAX_NUM_DELTA, 1);
- long oldStart = System.currentTimeMillis();
- Table old = newTable("default", "old_rfc", true);
- Partition oldP = newPartition(old, "part");
+ final String DB_NAME = "default";
+ final String OLD_TABLE_NAME = "old_rfc";
+ final String OLD_PARTITION_NAME = "part";
+ final String YOUNG_TABLE_NAME = "young_rfc";
+ final String YOUNG_PARTITION_NAME = "part";
+
+ Table old = newTable(DB_NAME, OLD_TABLE_NAME, true);
+ Partition oldP = newPartition(old, OLD_PARTITION_NAME);
addBaseFile(old, oldP, 20L, 20);
addDeltaFile(old, oldP, 21L, 22L, 2);
addDeltaFile(old, oldP, 23L, 24L, 2);
- burnThroughTransactions("default", "old_rfc", 25);
- CompactionRequest rqst = new CompactionRequest("default", "old_rfc", CompactionType.MINOR);
- rqst.setPartitionname("ds=part");
- txnHandler.compact(rqst);
- startWorker();
+ burnThroughTransactions(DB_NAME, OLD_TABLE_NAME, 25);
+ doCompaction(DB_NAME, OLD_TABLE_NAME, OLD_PARTITION_NAME, CompactionType.MINOR);
+ long oldTableClosestCqCommitTime = System.currentTimeMillis();
- long youngStart = System.currentTimeMillis();
- Table young = newTable("default", "young_rfc", true);
- Partition youngP = newPartition(young, "part");
+ Table young = newTable(DB_NAME, YOUNG_TABLE_NAME, true);
+ Partition youngP = newPartition(young, YOUNG_PARTITION_NAME);
addBaseFile(young, youngP, 20L, 20);
addDeltaFile(young, youngP, 21L, 22L, 2);
addDeltaFile(young, youngP, 23L, 24L, 2);
- burnThroughTransactions("default", "young_rfc", 25);
- rqst = new CompactionRequest("default", "young_rfc", CompactionType.MINOR);
- rqst.setPartitionname("ds=part");
- txnHandler.compact(rqst);
- startWorker();
+ burnThroughTransactions(DB_NAME, YOUNG_TABLE_NAME, 25);
+ doCompaction(DB_NAME, YOUNG_TABLE_NAME, YOUNG_PARTITION_NAME, CompactionType.MINOR);
+ long youngTableClosestCqCommitTime = System.currentTimeMillis();
+
+ Thread.sleep(1500);
Review comment:
what's the purpose of 1.5 sec sleep?
--
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-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org