Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4381

Remove magic string in QuorumPeerConfig

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      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

      if (key.equals("dataDir")) {
           dataDir = vff.create(value);
      } else if (key.equals("dataLogDir")) {
           dataLogDir = vff.create(value);
      }
      

      It might be better to maintain these configs string in a single class

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ruanwenjun Wenjun Ruan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m