You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by lt...@apache.org on 2019/12/04 07:03:15 UTC

[incubator-iotdb] branch fix_grafana_data_type_bug updated: fix data type bug in grafana

This is an automated email from the ASF dual-hosted git repository.

lta pushed a commit to branch fix_grafana_data_type_bug
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/fix_grafana_data_type_bug by this push:
     new 4b84cef  fix data type bug in grafana
4b84cef is described below

commit 4b84cef01f022521d26d73d35fde168fd7c30d05
Author: lta <li...@163.com>
AuthorDate: Wed Dec 4 15:02:51 2019 +0800

    fix data type bug in grafana
---
 .../main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java
index fe0e12a..9d00779 100644
--- a/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java
+++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java
@@ -142,8 +142,9 @@ public class BasicDaoImpl implements BasicDao {
           tv.setValue(0);
         } else {
           try {
-            tv.setValue(resultSet.getFloat(columnName));
+            tv.setValue(Float.parseFloat(resultSet.getString(columnName)));
           } catch (Exception e) {
+            logger.error("Can not parse the value {}", resultSet.getString(columnName));
             tv.setValue(0);
           }
         }