kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qiang Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-6787) enumerate SampledStat.samples got null item
Date Fri, 13 Apr 2018 04:41:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-6787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Qiang Zhao updated KAFKA-6787:
------------------------------
    Description: 
java.lang.NullPointerException at org.apache.kafka.common.metrics.stats.SampledStat.purgeObsoleteSamples(SampledStat.java:104)
at org.apache.kafka.common.metrics.stats.SampledStat.measure(SampledStat.java:74) at org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:68)
at kafka.api.QuotaTestClients$.metricValue(BaseQuotaTest.scala:163) at kafka.api.QuotaTestClients.produceUntilThrottled(BaseQuotaTest.scala:193)
at kafka.api.BaseQuotaTest.testThrottledProducerConsumer(BaseQuotaTest.scala:84)

 
{code:java}
    protected void purgeObsoleteSamples(MetricConfig config, long now) {
        long expireAge = config.samples() * config.timeWindowMs();
        for (Sample sample : samples) {
            if (now - sample.lastWindowMs >= expireAge)  // line 104, sample is null, probably
is a concurrent issue
                sample.reset(now);
        }
    }
{code}

  was:
h3. Stacktrace

java.lang.NullPointerException at org.apache.kafka.common.metrics.stats.SampledStat.purgeObsoleteSamples(SampledStat.java:104)
at org.apache.kafka.common.metrics.stats.SampledStat.measure(SampledStat.java:74) at org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:68)
at kafka.api.QuotaTestClients$.metricValue(BaseQuotaTest.scala:163) at kafka.api.QuotaTestClients.produceUntilThrottled(BaseQuotaTest.scala:193)
at kafka.api.BaseQuotaTest.testThrottledProducerConsumer(BaseQuotaTest.scala:84)


> enumerate SampledStat.samples got null item
> -------------------------------------------
>
>                 Key: KAFKA-6787
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6787
>             Project: Kafka
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 1.1.0
>            Reporter: Qiang Zhao
>            Priority: Critical
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> java.lang.NullPointerException at org.apache.kafka.common.metrics.stats.SampledStat.purgeObsoleteSamples(SampledStat.java:104)
at org.apache.kafka.common.metrics.stats.SampledStat.measure(SampledStat.java:74) at org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:68)
at kafka.api.QuotaTestClients$.metricValue(BaseQuotaTest.scala:163) at kafka.api.QuotaTestClients.produceUntilThrottled(BaseQuotaTest.scala:193)
at kafka.api.BaseQuotaTest.testThrottledProducerConsumer(BaseQuotaTest.scala:84)
>  
> {code:java}
>     protected void purgeObsoleteSamples(MetricConfig config, long now) {
>         long expireAge = config.samples() * config.timeWindowMs();
>         for (Sample sample : samples) {
>             if (now - sample.lastWindowMs >= expireAge)  // line 104, sample is null,
probably is a concurrent issue
>                 sample.reset(now);
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message