Make available keyvalue.datasource override by -D param
This commit is contained in:
parent
d7f2c859ea
commit
158a86dfd2
|
@ -84,6 +84,8 @@ public class SystemProperties {
|
|||
// load a properties file from class path, inside static method
|
||||
prop.load(input);
|
||||
|
||||
overideCLIParams();
|
||||
|
||||
} catch (IOException ex) {
|
||||
logger.error(ex.getMessage(), ex);
|
||||
} finally {
|
||||
|
@ -97,6 +99,13 @@ public class SystemProperties {
|
|||
}
|
||||
}
|
||||
|
||||
private void overideCLIParams() {
|
||||
String value = System.getProperty("keyvalue.datasource");
|
||||
if (value != null){
|
||||
prop.setProperty("keyvalue.datasource", value);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean peerDiscovery() {
|
||||
if (prop.isEmpty()) return true;
|
||||
return Boolean.parseBoolean(prop.getProperty("peer.discovery"));
|
||||
|
|
Loading…
Reference in New Issue