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

haonan pushed a commit to branch compressiongrafana
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit add24ec3298ab70c8b9296a4e7708c2f5e9f478e
Author: HTHou <[email protected]>
AuthorDate: Mon May 17 17:21:45 2021 +0800

    Add rpc compression config for grafana connector
---
 .../apache/iotdb/web/grafana/TsfileWebDemoApplication.java   | 12 +++++++++++-
 grafana/src/main/resources/application.properties            |  3 +++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java
 
b/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java
index 125ebd3..9f453c2 100644
--- 
a/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java
+++ 
b/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java
@@ -18,13 +18,23 @@
  */
 package org.apache.iotdb.web.grafana;
 
+import org.apache.iotdb.jdbc.Config;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Repository;
 
 @SpringBootApplication
+@Repository
+@PropertySource("classpath:application.properties")
 public class TsfileWebDemoApplication {
 
-  public static void main(String[] args) {
+  @Value("${rpc_thrift_compression_enable}")
+  private boolean rpcThriftCompressionEnable;
+
+  public void main(String[] args) {
+    Config.rpcThriftCompressionEnable = this.rpcThriftCompressionEnable;
     SpringApplication.run(TsfileWebDemoApplication.class, args);
   }
 }
diff --git a/grafana/src/main/resources/application.properties 
b/grafana/src/main/resources/application.properties
index eeb9653..16ec0e9 100644
--- a/grafana/src/main/resources/application.properties
+++ b/grafana/src/main/resources/application.properties
@@ -37,3 +37,6 @@ continuous_data_function=AVG
 # aggregation function to use to downsampling the data
 # COUNT, FIRST_VALUE, LAST_VALUE, MAX_TIME, MIN_TIME, NOW
 discrete_data_function=LAST_VALUE
+
+# is thrift compression enabled 
+rpc_thrift_compression_enable=false

Reply via email to