File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
metrics/interface/src/main/java/org/apache/iotdb/metrics/config Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,23 @@ public ReloadLevel loadHotProps() {
104104 private String getPropsUrl () {
105105 // first, try to get conf folder of standalone iotdb or datanode
106106 String url = System .getProperty (MetricConstant .IOTDB_CONF , null );
107+ if (url == null ) {
108+ // try to get conf folder from IOTDB_HOME
109+ url = System .getProperty (MetricConstant .IOTDB_HOME , null );
110+ if (url != null ) {
111+ url += File .separator + "conf" ;
112+ }
113+ }
107114 // second, try to get conf folder of datanode
108115 if (url == null ) {
109116 url = System .getProperty (MetricConstant .CONFIGNODE_CONF , null );
117+ if (url == null ) {
118+ // try to get conf folder from CONFIGNODE_HOME
119+ url = System .getProperty (MetricConstant .CONFIGNODE_HOME , null );
120+ if (url != null ) {
121+ url += File .separator + "conf" ;
122+ }
123+ }
110124 }
111125 // finally, return null when not find
112126 if (url == null ) {
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ private MetricConstant() {}
2525
2626 static final String IOTDB_CONF = "IOTDB_CONF" ;
2727
28+ static final String IOTDB_HOME = "IOTDB_HOME" ;
29+
2830 static final String CONFIGNODE_CONF = "CONFIGNODE_CONF" ;
2931
32+ static final String CONFIGNODE_HOME = "CONFIGNODE_HOME" ;
33+
3034 static final String CONFIG_NAME = "iotdb-metric.yml" ;
3135}
You can’t perform that action at this time.
0 commit comments