You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "spoon-lz (via GitHub)" <gi...@apache.org> on 2025/12/08 03:50:22 UTC

[I] Flink printed metric-related error logs when reading data. [fluss]

spoon-lz opened a new issue, #2123:
URL: https://github.com/apache/fluss/issues/2123

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
   
   
   ### Fluss version
   
   main (development)
   
   ### Please describe the bug 🐞
   
   Error log when read from fluss:
   
   `2025-12-03 17:35:14,660 [Source: cayde_test_fluss_1202_t2[1] (1/1)#77] WARN  org.apache.flink.metrics.prometheus.PrometheusReporter        - There was a problem registering metric bytesPerRequest.
   java.lang.NullPointerException: Cannot invoke "org.apache.flink.metrics.HistogramStatistics.getMin()" because "statistics" is null
   	at org.apache.flink.metrics.prometheus.AbstractPrometheusReporter$HistogramSummaryProxy.addSamples(AbstractPrometheusReporter.java:404)
   	at org.apache.flink.metrics.prometheus.AbstractPrometheusReporter$HistogramSummaryProxy.collect(AbstractPrometheusReporter.java:369)
   	at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:100)
   	at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50)
   	at io.prometheus.client.Collector.register(Collector.java:139)
   	at org.apache.flink.metrics.prometheus.AbstractPrometheusReporter.notifyOfAddedMetric(AbstractPrometheusReporter.java:155)
   	at org.apache.flink.runtime.metrics.MetricRegistryImpl.forAllReporters(MetricRegistryImpl.java:475)
   	at org.apache.flink.runtime.metrics.MetricRegistryImpl.register(MetricRegistryImpl.java:395)
   	at org.apache.flink.runtime.metrics.groups.AbstractMetricGroup.addMetric(AbstractMetricGroup.java:421)
   	at org.apache.flink.runtime.metrics.groups.AbstractMetricGroup.histogram(AbstractMetricGroup.java:374)
   	at org.apache.fluss.flink.metrics.FlinkMetricRegistry.registerMetric(FlinkMetricRegistry.java:128)
   	at org.apache.fluss.flink.metrics.FlinkMetricRegistry.register(FlinkMetricRegistry.java:88)
   	at org.apache.fluss.metrics.groups.AbstractMetricGroup.addMetric(AbstractMetricGroup.java:298)
   	at org.apache.fluss.metrics.groups.AbstractMetricGroup.histogram(AbstractMetricGroup.java:250)
   	at org.apache.fluss.client.metrics.ScannerMetricGroup.<init>(ScannerMetricGroup.java:76)
   	at org.apache.fluss.client.table.scanner.log.LogScannerImpl.<init>(LogScannerImpl.java:94)
   	at org.apache.fluss.client.table.scanner.TableScan.createLogScanner(TableScan.java:106)
   	at org.apache.fluss.flink.source.reader.FlinkSourceSplitReader.<init>(FlinkSourceSplitReader.java:135)
   	at org.apache.fluss.flink.source.reader.FlinkSourceReader.lambda$new$0(FlinkSourceReader.java:69)
   	at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager.createSplitFetcher(SplitFetcherManager.java:196)
   	at org.apache.flink.connector.base.source.reader.fetcher.SingleThreadFetcherManager.addSplits(SingleThreadFetcherManager.java:107)
   	at org.apache.flink.connector.base.source.reader.SourceReaderBase.addSplits(SourceReaderBase.java:242)
   	at org.apache.flink.streaming.api.operators.SourceOperator.open(SourceOperator.java:349)
   	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:107)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:740)
   	at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:715)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:681)
   	at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:962)
   	at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:928)
   	at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:750)
   	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:564)
   	at java.base/java.lang.Thread.run(Thread.java:833)`
   
   ### Solution
   
   FlinkHistogram#getStatistics() just return null ,a correct result needs to be return.
   
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
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: issues-unsubscribe@fluss.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Flink printed metric-related error logs when reading data. [fluss]

Posted by "rionmonster (via GitHub)" <gi...@apache.org>.
rionmonster commented on issue #2123:
URL: https://github.com/apache/fluss/issues/2123#issuecomment-3665557825

   I've gone ahead and introduced a PR that should address this issue (replacing the current explicit null return in favor of wrapping the existing statistics in an available `FlinkHistogramStatistics` instance).


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Flink printed metric-related error logs when reading data. [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong closed issue #2123: Flink printed metric-related error logs when reading data.
URL: https://github.com/apache/fluss/issues/2123


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org