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

zkServer.sh code format is oldfashioned and chaotic

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.5, 3.5.6, 3.5.7, 3.6.1, 3.5.8
    • Fix Version/s: None
    • Component/s: scripts
    • Labels:
      None

      Description

      Replaced old comparison of vars, usually used in sh.

      Since the script is now pure bash, it's better to use more standard comparators to improve readability, like 

       

      [ -z $var ] 
      

      instead of

      [ "x$var" = "x" ]

      Also equalized a bit the indentation and format of "if" statements in the script.

      This will improve readability, as pointed out above, and make it easier to maintain

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tanisdlj Diego Lucas Jiménez
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: