Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3417

[FS Action] Refactor and optimize FsActionExecutor.java decision making part

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.2.0
    • 5.2.0
    • core

    Description

      When I read FsActionExecutor.java, I found a not good code in this class.  When judging which logic to use based on commands, should use "switch/case" replace "if/else":

      1. “if/else” make the code hard to read
      2. “if/else” make the code hard to extend
      3. “if/else” has low  efficience

      So I suggest using “switch/case” instead.

      Attachments

        1. oozie-3417-01.patch
          7 kB
          xiong duan
        2. oozie-3417-02.patch
          8 kB
          xiong duan
        3. oozie-3417-03.patch
          10 kB
          xiong duan
        4. oozie-3417-04.patch
          10 kB
          xiong duan
        5. oozie-3417-05.patch
          13 kB
          xiong duan
        6. oozie-3417-06.patch
          13 kB
          xiong duan

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nobigo xiong duan
            nobigo xiong duan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment