File tree Expand file tree Collapse file tree 6 files changed +34
-0
lines changed
integration-test/src/main/java/org/apache/iotdb
datanode/src/main/java/org/apache/iotdb/db/conf
node-commons/src/assembly/resources/conf Expand file tree Collapse file tree 6 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -137,4 +137,10 @@ public DataNodeConfig setDataNodeMemoryProportion(String dataNodeMemoryProportio
137137 setProperty ("datanode_memory_proportion" , dataNodeMemoryProportion );
138138 return this ;
139139 }
140+
141+ @ Override
142+ public DataNodeConfig setQueryCostStatWindow (int queryCostStatWindow ) {
143+ setProperty ("query_cost_stat_window" , String .valueOf (queryCostStatWindow ));
144+ return this ;
145+ }
140146}
Original file line number Diff line number Diff line change @@ -93,4 +93,9 @@ public DataNodeConfig setDeleteWalFilesPeriodInMs(long deleteWalFilesPeriodInMs)
9393 public DataNodeConfig setDataNodeMemoryProportion (String dataNodeMemoryProportion ) {
9494 return this ;
9595 }
96+
97+ @ Override
98+ public DataNodeConfig setQueryCostStatWindow (int queryCostStatWindow ) {
99+ return this ;
100+ }
96101}
Original file line number Diff line number Diff line change @@ -51,4 +51,6 @@ DataNodeConfig setLoadTsFileAnalyzeSchemaMemorySizeInBytes(
5151 DataNodeConfig setDeleteWalFilesPeriodInMs (long deleteWalFilesPeriodInMs );
5252
5353 DataNodeConfig setDataNodeMemoryProportion (String dataNodeMemoryProportion );
54+
55+ DataNodeConfig setQueryCostStatWindow (int queryCostStatWindow );
5456}
Original file line number Diff line number Diff line change @@ -814,6 +814,9 @@ public class IoTDBConfig {
814814 /** time cost(ms) threshold for slow query. Unit: millisecond */
815815 private long slowQueryThreshold = 10000 ;
816816
817+ /** time window threshold for record of history queries. Unit: minute */
818+ private int queryCostStatWindow = 0 ;
819+
817820 private int patternMatchingThreshold = 1000000 ;
818821
819822 /**
@@ -2612,6 +2615,14 @@ public void setSlowQueryThreshold(long slowQueryThreshold) {
26122615 this .slowQueryThreshold = slowQueryThreshold ;
26132616 }
26142617
2618+ public int getQueryCostStatWindow () {
2619+ return queryCostStatWindow ;
2620+ }
2621+
2622+ public void setQueryCostStatWindow (int queryCostStatWindow ) {
2623+ this .queryCostStatWindow = queryCostStatWindow ;
2624+ }
2625+
26152626 public boolean isEnableIndex () {
26162627 return enableIndex ;
26172628 }
Original file line number Diff line number Diff line change @@ -813,6 +813,11 @@ public void loadProperties(TrimProperties properties) throws BadNodeUrlException
813813 properties .getProperty (
814814 "slow_query_threshold" , String .valueOf (conf .getSlowQueryThreshold ()))));
815815
816+ conf .setQueryCostStatWindow (
817+ Integer .parseInt (
818+ properties .getProperty (
819+ "query_cost_stat_window" , String .valueOf (conf .getQueryCostStatWindow ()))));
820+
816821 conf .setDataRegionNum (
817822 Integer .parseInt (
818823 properties .getProperty ("data_region_num" , String .valueOf (conf .getDataRegionNum ()))));
Original file line number Diff line number Diff line change @@ -1080,6 +1080,11 @@ max_tsblock_line_number=1000
10801080# Datatype: long
10811081slow_query_threshold=10000
10821082
1083+ # Time window threshold(min) for record of history queries.
1084+ # effectiveMode: hot_reload
1085+ # Datatype: int
1086+ query_cost_stat_window=0
1087+
10831088# The max executing time of query. unit: ms
10841089# effectiveMode: restart
10851090# Datatype: int
You can’t perform that action at this time.
0 commit comments