Skip to content

Commit

Permalink
[warehouse] add support using greptimedb store history metrics data(#834
Browse files Browse the repository at this point in the history
)

* [script] update warehouse jpa store metrics expire-time to 1h

* [script] update warehouse jpa store metrics expire-time to 1h

* [script] update warehouse jpa store metrics expire-time to 1h

* [script] update warehouse jpa store metrics expire-time to 1h

* [warehouse] support greptime db store metrics data

* [manager] update version

* [manager] update greptime

* [manager] update greptime

* constraint common dependencies version

* fix unsupported error

* remove success result

* [code]feature: add GrepTimeDb `getHistoryMetricData`

* [warehouse]feature:
1.add GrepTimeDb `createDatabase`
2.Check if the database exists; if it does not exist, create the database.

* [warehouse]feature:
1.add GrepTimeDb `getHistory`

* [warehouse] bugfix can not catch exception when table not exist

* [warehouse] support time period string query, 1h 3D 3W

* [warehouse] support time period string query, 1h 3D 3W

* [warehouse]feature:
1.add GrepTimeDb `getHistoryIntervalMetricData`

* merge master

* update

* [warehouse]Add support for greptimedb.

* [warehouse]Add support for greptimedb.

* Update warehouse/src/main/java/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.java

Co-authored-by: JeremyHi <jiachun_feng@proton.me>
Signed-off-by: zqr10159 <zqr10159@126.com>

* Update warehouse/src/main/java/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.java

Co-authored-by: JeremyHi <jiachun_feng@proton.me>
Signed-off-by: zqr10159 <zqr10159@126.com>

* Update warehouse/src/main/java/org/dromara/hertzbeat/warehouse/store/HistoryGrepTimeDbDataStorage.java

Co-authored-by: JeremyHi <jiachun_feng@proton.me>
Signed-off-by: tomsun28 <tomsun28@outlook.com>

* [warehouse]
1.Update greptimedb `0.1.2` to `0.1.3`,
2.Use async method `future.get()` to write rows,
3.Update `GrepTime` to `Greptime`

* [warehouse]
1.Update greptimedb `0.1.2` to `0.1.3`,
2.Use sync method `future.get()` to write rows,
3.Update `GrepTime` to `Greptime`

* Update warehouse/pom.xml


---------

Signed-off-by: zqr10159 <zqr10159@126.com>
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: JeremyHi <jiachun_feng@proton.me>
  • Loading branch information
3 people authored Apr 4, 2023
1 parent 5374812 commit dc56425
Show file tree
Hide file tree
Showing 4 changed files with 708 additions and 182 deletions.
47 changes: 47 additions & 0 deletions warehouse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<iotdb-session.version>0.13.3</iotdb-session.version>
<spring-cloud-starter-openfeign.version>3.0.5</spring-cloud-starter-openfeign.version>
<taos-jdbcdriver.version>3.0.0</taos-jdbcdriver.version>
<greptimedb.version>0.1.3</greptimedb.version>
</properties>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -78,6 +79,52 @@
<artifactId>iotdb-session</artifactId>
<version>${iotdb-session.version}</version>
</dependency>
<dependency>
<groupId>io.greptime</groupId>
<artifactId>greptimedb-protocol</artifactId>
<version>${greptimedb.version}</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.greptime</groupId>
<artifactId>greptimedb-grpc</artifactId>
<version>${greptimedb.version}</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-all</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ public static class StoreProperties {
* IoTDB配置信息
*/
private IotDbProperties iotDb;
/**
* GrepTimeDB Config
*/
private GreptimeProperties greptime;

public JpaProperties getJpa() {
return jpa;
Expand Down Expand Up @@ -209,6 +213,14 @@ public void setIotDb(IotDbProperties iotDb) {
this.iotDb = iotDb;
}

public GreptimeProperties getGreptime() {
return greptime;
}

public void setGreptime(GreptimeProperties greptime) {
this.greptime = greptime;
}

public static class MemoryProperties {
/**
* 内存数据存储是否启动
Expand Down Expand Up @@ -596,6 +608,60 @@ public void setExpireTime(String expireTime) {
this.expireTime = expireTime;
}
}

public static class GreptimeProperties {
/**
* Whether the GrepTimeDB data store is enabled
*/
private boolean enabled = false;

/**
* GrepTimeDB endpoint
*/
private String endpoint = "127.0.0.1:4001";

/**
* GrepTimeDB username
*/
private String username;

/**
* GrepTimeDB password
*/
private String password;

public boolean isEnabled() {
return enabled;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public String getEndpoint() {
return endpoint;
}

public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}

public String getUsername() {
return username;
}

public void setUsername(String username) {
this.username = username;
}

public String getPassword() {
return password;
}

public void setPassword(String password) {
this.password = password;
}
}
}

}
Loading

0 comments on commit dc56425

Please sign in to comment.