開心生活站

位置:首頁 > IT科技 > 

java,influxdb

IT科技7.5K

<link rel="stylesheet" href="https://js.how234.com/559000b9bd/4c9a02a4bec20fc1fc2f0e60a2782b5ffb/4c9715bcbac9/4c8b2fbfaddf.css" type="text/css" /><link rel="stylesheet" href="https://js.how234.com/559000b9bd/4c9a02a4bec20fc1fc2f0e60a2782b5ffb/4c9715bcbac9/4c8b38b8bad702ecfe21037ca964.css" type="text/css" /><script type="text/javascript" src="https://js.how234.com/third-party/SyntaxHighlighter/shCore.js"></script><style>pre{overflow-x: auto}</style>

   <link rel="stylesheet" href="https://js.how234.com/third-party/SyntaxHighlighter/shCoreDefault.css" type="text/css" /><script type="text/javascript" src="https://js.how234.com/third-party/SyntaxHighlighter/shCore.js"></script><script type="text/javascript"> SyntaxHighlighter.all(); </script>

java influxdb是什麼,讓我們一起了解一下?

influxdb是一個開源分佈式時序、事件和指標數據庫,使用 Go 語言編寫,無需外部依賴。其設計目標是實現分佈式和水平伸縮擴展。

平常我們經常使用的InfluxDB2.0語法是怎樣的?

1、from 指定數據源bucket。

2、range 指定起始時間段。

3、filter 過濾。

4、yield作爲查詢結果輸出過濾的tables。

5、aggregateWindow函數,可結合參數every輸出持續時間,比如每5s,createEmpty:true沒有數據返回一行空數據,可結合fill(usePrevious: true)將此空數據賦值爲前一條非空的數據值。

java influxdb

InfluxDB在Java中是如何使用的?

InfluxDB(時序數據庫),常用的一種使用場景:監控數據統計。每毫秒記錄一下電腦內存的使用情況,然後就可以根據統計的數據,利用圖形化界面(InfluxDB V1一般配合Grafana)製作內存使用情況的折線圖。

package com.influxdb.pojo; import java.io.Serializable; public class CodeInfo implements Serializable{ private static final long serialVersionUID = 1L;private Long id;private String name;private String code;private String descr;private String descrE;private String createdBy;private Long createdAt;private String time;private String tagCode;private String tagName; public Long getId() {return id;} public void setId(Long id) {this.id = id;} public String getName() {return name;} public void setName(String name) {this.name = name;} public String getCode() {return code;} public void setCode(String code) {this.code = code;} public String getDescr() {return descr;} public void setDescr(String descr) {this.descr = descr;} public String getDescrE() {return descrE;} public void setDescrE(String descrE) {this.descrE = descrE;} public String getCreatedBy() {return createdBy;} public void setCreatedBy(String createdBy) {this.createdBy = createdBy;} public Long getCreatedAt() {return createdAt;} public void setCreatedAt(Long createdAt) {this.createdAt = createdAt;} public String getTime() {return time;} public void setTime(String time) {this.time = time;} public String getTagCode() {return tagCode;} public void setTagCode(String tagCode) {this.tagCode = tagCode;} public String getTagName() {return tagName;} public void setTagName(String tagName) {this.tagName = tagName;} }

標籤:influxdb java