Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-2663

MR-279: Refactoring StateMachineFactory inner classes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: mrv2
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The code for ApplicableSingleTransition and ApplicableMultipleTransition inner classes is almost identical. For maintainability, it is better to refactor them into a single inner class.

        Activity

        Hide
        Ahmed Radwan added a comment -

        This patch refactors the StateMachineFactory inner classes code.

        Show
        Ahmed Radwan added a comment - This patch refactors the StateMachineFactory inner classes code.
        Hide
        Josh Wills added a comment -

        Thanks for cleaning this up!

        My only comment is that I think we can do away with the ApplicableTransition interface entirely, since it is a private, inner interface that just has one implementation. So why not rename ApplicableSingleOrMultipleTransition -> ApplicableTransition, and remove the interface definition entirely?

        Show
        Josh Wills added a comment - Thanks for cleaning this up! My only comment is that I think we can do away with the ApplicableTransition interface entirely, since it is a private, inner interface that just has one implementation. So why not rename ApplicableSingleOrMultipleTransition -> ApplicableTransition, and remove the interface definition entirely?
        Hide
        Ahmed Radwan added a comment -

        Thanks for your review Josh!
        It is generally beneficial to have this interface separation, specially if we decided to add other implementations in the future. This was my basic motive for keeping the interface.

        Show
        Ahmed Radwan added a comment - Thanks for your review Josh! It is generally beneficial to have this interface separation, specially if we decided to add other implementations in the future. This was my basic motive for keeping the interface.
        Hide
        Mahadev konar added a comment -

        looks good Ahmed. I think we can probably still keep the interface as long as its not public. Did you already run mvn test? If yes Ill go ahead and push it.

        Show
        Mahadev konar added a comment - looks good Ahmed. I think we can probably still keep the interface as long as its not public. Did you already run mvn test? If yes Ill go ahead and push it.
        Hide
        Ahmed Radwan added a comment -

        Thanks Mahadev! Yes, and all tests ran successfully.

        Show
        Ahmed Radwan added a comment - Thanks Mahadev! Yes, and all tests ran successfully.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12485723/MAPREDUCE-2663.patch
        against trunk revision 1145679.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/458//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12485723/MAPREDUCE-2663.patch against trunk revision 1145679. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/458//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        I just pushed this. Thanks Ahmed!

        Show
        Mahadev konar added a comment - I just pushed this. Thanks Ahmed!

          People

          • Assignee:
            Ahmed Radwan
            Reporter:
            Ahmed Radwan
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development