You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Wenjun Ruan (Jira)" <ji...@apache.org> on 2021/09/21 04:01:00 UTC
[jira] [Created] (ZOOKEEPER-4381) Remove magic string in
QuorumPeerConfig
Wenjun Ruan created ZOOKEEPER-4381:
--------------------------------------
Summary: Remove magic string in QuorumPeerConfig
Key: ZOOKEEPER-4381
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4381
Project: ZooKeeper
Issue Type: Improvement
Reporter: Wenjun Ruan
Currently, we write magic string in QuorumPeerConfig, this may not be a good practice.
https://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad
{code:java}
if (key.equals("dataDir")) {
dataDir = vff.create(value);
} else if (key.equals("dataLogDir")) {
dataLogDir = vff.create(value);
}
{code}
It might be better to maintain these configs string in a single class
--
This message was sent by Atlassian Jira
(v8.3.4#803005)