klcopp commented on a change in pull request #2460:
URL: https://github.com/apache/hive/pull/2460#discussion_r666753498
##########
File path:
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCompactionMetrics.java
##########
@@ -834,19 +833,36 @@ public void testWritesToDisabledCompactionTable() throws
Exception {
private ShowCompactResponseElement generateElement(long id, String db,
String table, String partition,
CompactionType type, String state) {
- return generateElement(id, db, table, partition, type, state,
System.currentTimeMillis());
+ return generateElement(id, db, table, partition, type, state, false);
+ }
+
+ private ShowCompactResponseElement generateElement(long id, String db,
String table, String partition,
+ CompactionType type, String state, boolean manuallyInitiatedCompaction) {
+ return generateElement(id, db, table, partition, type, state,
manuallyInitiatedCompaction, System.currentTimeMillis());
}
private ShowCompactResponseElement generateElement(long id, String db,
String table, String partition,
CompactionType type, String state, long enqueueTime) {
+ return generateElement(id, db, table, partition, type, state, false,
enqueueTime);
+ }
+
+ private ShowCompactResponseElement generateElement(long id, String db,
String table, String partition,
+ CompactionType type, String state, boolean manuallyInitiatedCompaction,
long enqueueTime) {
ShowCompactResponseElement element = new ShowCompactResponseElement(db,
table, type, state);
element.setId(id);
element.setPartitionname(partition);
element.setEnqueueTime(enqueueTime);
- String runtimeId = ServerUtils.hostname() + "-" +
ThreadLocalRandom.current().nextInt();
Review comment:
This was generating negative integers, that's why the number of
initiator and worker hosts was 2 in testUpdateCompactionMetrics
--
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]