apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjay M Pujare (JIRA)" <j...@apache.org>
Subject [jira] [Created] (APEXCORE-771) Refactor the function StreamingAppMasterService.execute() for maintainability
Date Thu, 27 Jul 2017 11:28:02 GMT
Sanjay M Pujare created APEXCORE-771:
----------------------------------------

             Summary: Refactor the function StreamingAppMasterService.execute() for maintainability
                 Key: APEXCORE-771
                 URL: https://issues.apache.org/jira/browse/APEXCORE-771
             Project: Apache Apex Core
          Issue Type: Improvement
            Reporter: Sanjay M Pujare


PR#535 discussion is the reason for this PR.

Refactoring StreamingAppMasterService.execute() would consist of splitting this code into
multiple smaller functions (or even classes) and using mocks to unit test these smaller chunks.
For example we can create a class and move all the requested/released container list and count
management in this class. This way the code in StreamingAppMasterService.execute() will be
manageably small.

Benefits from this refactoring effort are:
- code will be easy to understand and maintain for new members because of multiple small functions
or classes
- it will be easy to simulate various corner or error cases related to Yarn behavior using
mocks that currently are impossible to simulate
- for every new bug reported we will be able to add unit tests to create a regression test
suite.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message