Search in sources :

Example 6 with RoutingNodeType

use of io.confluent.ksql.util.KsqlConstants.RoutingNodeType in project ksql by confluentinc.

the class PullQueryExecutorMetrics method configureSensorMap.

private Map<MetricsKey, Sensor> configureSensorMap(final String sensorBaseName, final MetricsAdder metricsAdder) {
    final ImmutableMap.Builder<MetricsKey, Sensor> builder = ImmutableMap.builder();
    for (final QuerySourceType sourceType : QuerySourceType.values()) {
        for (final PullPhysicalPlanType planType : PullPhysicalPlanType.values()) {
            for (final RoutingNodeType routingNodeType : RoutingNodeType.values()) {
                addSensorToMap(sensorBaseName, metricsAdder, builder, new MetricsKey(sourceType, planType, routingNodeType));
            }
        }
    }
    // Add one more sensor for collecting metrics when there is no response
    addSensorToMap(sensorBaseName, metricsAdder, builder, new MetricsKey());
    return builder.build();
}
Also used : RoutingNodeType(io.confluent.ksql.util.KsqlConstants.RoutingNodeType) PullPhysicalPlanType(io.confluent.ksql.physical.pull.PullPhysicalPlan.PullPhysicalPlanType) ImmutableMap(com.google.common.collect.ImmutableMap) Sensor(org.apache.kafka.common.metrics.Sensor) QuerySourceType(io.confluent.ksql.util.KsqlConstants.QuerySourceType)

Example 7 with RoutingNodeType

use of io.confluent.ksql.util.KsqlConstants.RoutingNodeType in project ksql by confluentinc.

the class ScalablePushQueryMetrics method configureSensorMap.

private Map<MetricsKey, Sensor> configureSensorMap(final String sensorBaseName, final MetricsAdder metricsAdder) {
    final ImmutableMap.Builder<MetricsKey, Sensor> builder = ImmutableMap.builder();
    for (final QuerySourceType sourceType : QuerySourceType.values()) {
        for (final RoutingNodeType routingNodeType : RoutingNodeType.values()) {
            addSensorToMap(sensorBaseName, metricsAdder, builder, new MetricsKey(sourceType, routingNodeType));
        }
    }
    // Add one more sensor for collecting metrics when there is no response
    addSensorToMap(sensorBaseName, metricsAdder, builder, new MetricsKey());
    return builder.build();
}
Also used : RoutingNodeType(io.confluent.ksql.util.KsqlConstants.RoutingNodeType) ImmutableMap(com.google.common.collect.ImmutableMap) Sensor(org.apache.kafka.common.metrics.Sensor) QuerySourceType(io.confluent.ksql.util.KsqlConstants.QuerySourceType)

Aggregations

RoutingNodeType (io.confluent.ksql.util.KsqlConstants.RoutingNodeType)7 ImmutableAnalysis (io.confluent.ksql.analyzer.ImmutableAnalysis)5 PullQueryExecutorMetrics (io.confluent.ksql.internal.PullQueryExecutorMetrics)5 ScalablePushQueryMetrics (io.confluent.ksql.internal.ScalablePushQueryMetrics)5 QuerySourceType (io.confluent.ksql.util.KsqlConstants.QuerySourceType)5 ImmutableMap (com.google.common.collect.ImmutableMap)4 PullQueryResult (io.confluent.ksql.physical.pull.PullQueryResult)4 TransientQueryQueue (io.confluent.ksql.query.TransientQueryQueue)4 ScalablePushQueryMetadata (io.confluent.ksql.util.ScalablePushQueryMetadata)4 Optional (java.util.Optional)4 MetricsCallback (io.confluent.ksql.api.server.MetricsCallback)3 SlidingWindowRateLimiter (io.confluent.ksql.api.server.SlidingWindowRateLimiter)3 PullPhysicalPlanType (io.confluent.ksql.physical.pull.PullPhysicalPlan.PullPhysicalPlanType)3 Decrementer (io.confluent.ksql.rest.util.ConcurrencyLimiter.Decrementer)3 StreamPullQueryMetadata (io.confluent.ksql.util.StreamPullQueryMetadata)3 AtomicReference (java.util.concurrent.atomic.AtomicReference)3 KafkaStreams (org.apache.kafka.streams.KafkaStreams)3 State (org.apache.kafka.streams.KafkaStreams.State)3 Throwables (com.google.common.base.Throwables)2 ImmutableSet (com.google.common.collect.ImmutableSet)2