mirror of https://github.com/apache/nifi.git
NIFI-8722: Updated Quest DB to account for newly added connection status metrics (#5181)
Co-authored-by: Bence Simon <simonbence>
This commit is contained in:
parent
1d9ea6d4cf
commit
ea710e44a3
|
@ -86,7 +86,10 @@ final class QuestDbQueries {
|
|||
"outputBytes LONG," +
|
||||
"outputCount LONG," +
|
||||
"queuedBytes LONG," +
|
||||
"queuedCount LONG" +
|
||||
"queuedCount LONG," +
|
||||
"totalQueuedDuration LONG," +
|
||||
"maxQueuedDuration LONG," +
|
||||
"averageQueuedDuration LONG" +
|
||||
") TIMESTAMP(capturedAt) PARTITION BY DAY";
|
||||
|
||||
public static final String CREATE_PROCESS_GROUP_STATUS =
|
||||
|
|
|
@ -35,6 +35,9 @@ public class QuestDbConnectionStatusStorage extends QuestDbComponentStatusStorag
|
|||
METRICS.put(5, ConnectionStatusDescriptor.OUTPUT_COUNT.getDescriptor());
|
||||
METRICS.put(6, ConnectionStatusDescriptor.QUEUED_BYTES.getDescriptor());
|
||||
METRICS.put(7, ConnectionStatusDescriptor.QUEUED_COUNT.getDescriptor());
|
||||
METRICS.put(8, ConnectionStatusDescriptor.TOTAL_QUEUED_DURATION.getDescriptor());
|
||||
METRICS.put(9, ConnectionStatusDescriptor.MAX_QUEUED_DURATION.getDescriptor());
|
||||
METRICS.put(10, ConnectionStatusDescriptor.AVERAGE_QUEUED_DURATION.getDescriptor());
|
||||
}
|
||||
|
||||
public QuestDbConnectionStatusStorage(final QuestDbContext dbContext, final ComponentDetailsStorage componentDetails) {
|
||||
|
|
|
@ -161,6 +161,10 @@ public abstract class AbstractStatusHistoryRepositoryTest {
|
|||
status.setOutputBytes(106);
|
||||
status.setMaxQueuedCount(107);
|
||||
status.setMaxQueuedBytes(108);
|
||||
|
||||
status.setTotalQueuedDuration(103L * 110L);
|
||||
status.setMaxQueuedDuration(111);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -261,6 +265,10 @@ public abstract class AbstractStatusHistoryRepositoryTest {
|
|||
Assert.assertEquals(105L, snapshot.getStatusMetric(ConnectionStatusDescriptor.OUTPUT_COUNT.getDescriptor()).longValue());
|
||||
Assert.assertEquals(104L, snapshot.getStatusMetric(ConnectionStatusDescriptor.QUEUED_BYTES.getDescriptor()).longValue());
|
||||
Assert.assertEquals(103L, snapshot.getStatusMetric(ConnectionStatusDescriptor.QUEUED_COUNT.getDescriptor()).longValue());
|
||||
|
||||
Assert.assertEquals(103L * 110L, snapshot.getStatusMetric(ConnectionStatusDescriptor.TOTAL_QUEUED_DURATION.getDescriptor()).longValue());
|
||||
Assert.assertEquals(111L, snapshot.getStatusMetric(ConnectionStatusDescriptor.MAX_QUEUED_DURATION.getDescriptor()).longValue());
|
||||
Assert.assertEquals(110L, snapshot.getStatusMetric(ConnectionStatusDescriptor.AVERAGE_QUEUED_DURATION.getDescriptor()).longValue());
|
||||
}
|
||||
|
||||
protected void assertRemoteProcessGroupSnapshot(final StatusSnapshot snapshot) {
|
||||
|
|
Loading…
Reference in New Issue