You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "iori2333 (via GitHub)" <gi...@apache.org> on 2023/03/26 06:36:10 UTC

[GitHub] [iotdb] iori2333 opened a new issue, #9454: [Bug] NPE when querying data using Grafana-plugin

iori2333 opened a new issue, #9454:
URL: https://github.com/apache/iotdb/issues/9454

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
   
   
   ### Version
   
   OS: Ubuntu 22.04
   IoTDB version: 1.0.0
   Grafana Plugin version: 1.0.0
   Grafana version: 9.4.3
   
   ### Describe the bug and provide the minimal reproduce step
   
   When querying using iotdb-cli, it returns the right results:
   ```
   IoTDB> select value_status from root.cloud2edge.digtwin
   +-----------------------------+------------------------------------+
   |                         Time|root.cloud2edge.digtwin.value_status|
   +-----------------------------+------------------------------------+
   |+53233074-02-13T11:.29746:04Z|                                 0.0|
   |+53233074-04-11T08:.80210:02Z|                                 0.0|
   |+53233074-06-08T12:.64826:20Z|                                 0.0|
   |+53233074-08-05T04:.93451:55Z|                                 0.0|
   |+53233074-10-01T17:.28127:53Z|                                 0.0|
   |+53233074-11-29T01:.63853:11Z|                                 0.0|
   |+53233075-01-25T15:.13543:02Z|                                 0.0|
   |+53233075-03-24T22:.81024:37Z|                                 0.0|
   |+53233075-05-22T11:.03510:13Z|                                 0.0|
   |+53233075-07-18T21:.36852:38Z|                                 0.0|
   |+53233075-09-14T23:.57951:09Z|                                 0.0|
   |+53233075-11-11T22:.02323:11Z|                                 0.0|
   |+53233076-01-09T10:.29436:04Z|                                 0.0|
   |+53233076-03-06T16:.91336:22Z|                                 0.0|
   |+53233076-05-03T11:.19733:36Z|                                 0.0|
   |+53233076-06-30T15:.65456:47Z|                                 0.0|
   |+53233076-08-27T04:.63710:56Z|                                 0.0|
   |+53233076-10-24T03:.12751:01Z|                                 0.0|
   |+53233076-12-21T18:.31605:33Z|                                 0.0|
   |+53233077-02-17T19:.22129:22Z|                                 0.0|
   |+53233077-04-16T00:.94209:54Z|                                 0.0|
   +-----------------------------+------------------------------------+
   ```
   
   However, when I use grafana plugin to query the same results, iotdb triggerred NPE:
   Query:
   ![图片](https://user-images.githubusercontent.com/81511507/227759525-3554fbb9-64fd-440c-9a18-f176e353d9f8.png)
   
   ```
   2023-03-26 06:17:14,577 [qtp2056499811-60] WARN  o.a.i.d.p.r.h.ExceptionHandler:85 - null 
   java.lang.NullPointerException: null
           at org.apache.iotdb.db.protocol.rest.handler.QueryDataSetHandler.fillQueryDataSetWithTimestamps(QueryDataSetHandler.java:181)
           at org.apache.iotdb.db.protocol.rest.handler.QueryDataSetHandler.fillDataSetWithTimestamps(QueryDataSetHandler.java:78)
           at org.apache.iotdb.db.protocol.rest.impl.GrafanaApiServiceImpl.expression(GrafanaApiServiceImpl.java:204)
           at org.apache.iotdb.db.protocol.rest.GrafanaApi.expression(GrafanaApi.java:73)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.base/java.lang.reflect.Method.invoke(Unknown Source)
           at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
           at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
           at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
           at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
           at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
           at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
           at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
           at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
           at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
           at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
           at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
           at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
           at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
           at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
           at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1656)
           at org.apache.iotdb.db.protocol.rest.filter.ApiOriginFilter.doFilter(ApiOriginFilter.java:37)
           at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
           at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626)
           at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
           at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
           at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
           at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
           at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
           at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
           at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
           at org.eclipse.jetty.server.Server.handle(Server.java:516)
           at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
           at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
           at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
           at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
           at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
           at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
           at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
           at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
           at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
           at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
           at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
           at java.base/java.lang.Thread.run(Unknown Source)
   ```
   
   ### What did you expect to see?
   
   I expect that grafana plugin should return the same query result as iotdb-cli
   
   ### What did you see instead?
   
   iotdb throws NPE and returns nothing
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] 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: reviews-unsubscribe@iotdb.apache.org.apache.org

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


[GitHub] [iotdb] iori2333 commented on issue #9454: [Bug] NPE when querying data using Grafana-plugin

Posted by "iori2333 (via GitHub)" <gi...@apache.org>.
iori2333 commented on issue #9454:
URL: https://github.com/apache/iotdb/issues/9454#issuecomment-1484096442

   After fixing the format of the timestamp, it works now. But I'm still confused why it throws NPE.


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] github-actions[bot] commented on issue #9454: [Bug] NPE when querying data using Grafana-plugin

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9454:
URL: https://github.com/apache/iotdb/issues/9454#issuecomment-1484009609

   Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] iori2333 closed issue #9454: [Bug] NPE when querying data using Grafana-plugin

Posted by "iori2333 (via GitHub)" <gi...@apache.org>.
iori2333 closed issue #9454: [Bug] NPE when querying data using Grafana-plugin
URL: https://github.com/apache/iotdb/issues/9454


-- 
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: reviews-unsubscribe@iotdb.apache.org

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