CRZbulabula commented on a change in pull request #5287:
URL: https://github.com/apache/iotdb/pull/5287#discussion_r830542782
##########
File path:
confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
##########
@@ -42,42 +43,52 @@ public ConfigNodeConf getConf() {
return conf;
}
- public String getPropsDir() {
Review comment:
Why delete this method? For distinguish ConfigNode's environment
variables from DataNode's, I set CONFIGNODE_NODE_CONF and CONFIGNODE_NODE_HOME
in the start-confignode scripts. Now we can see that the scripts output "WARN
org.apache.iotdb.confignode.conf.ConfigNodeDescriptor - Cannot find IOTDB_HOME
or IOTDB_CONF environment variable when loading config file
iotdb-confignode.properties, use default configuration". This is a bug needs to
be fixed.
##########
File path:
confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfCheck.java
##########
@@ -44,17 +45,13 @@
private Properties specialProperties;
- public void checkConfig() throws RepeatConfigurationException, IOException {
-
- String propsDir = ConfigNodeDescriptor.getInstance().getPropsDir();
- if (propsDir == null) {
- // Skip configuration check when developer mode or test mode
- return;
- }
+ private ConfigNodeConfCheck() {
specialProperties = new Properties();
+ }
+ public void checkConfig() throws ConfigurationException, IOException,
StartupException {
File specialPropertiesFile =
- new File(propsDir + File.separator +
ConfigNodeConstant.SPECIAL_CONF_NAME);
+ new File(conf.getSystemDir() + File.separator +
ConfigNodeConstant.SPECIAL_CONF_NAME);
Review comment:
It's ok for placing the special conf file to the system dir. But the
system dir needs to be created first.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]