[ 
https://issues.apache.org/jira/browse/TEZ-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037231#comment-14037231
 ] 

Oleg Zhurakousky commented on TEZ-1206:
---------------------------------------

The fact that we allow breaking changes between minor releases is a bit 
strange, but it is what it is, so I'll look at what are the issues with 2.5.

With regard to removing code from _main()_, here are my points:
DAGAppMaster actually only takes 1 (optional) argument. The rest comes from 
Environment variables and are being parsed in main, so no huge array to pass 
around. But that is not the main issue. What is is that parsing arguments in 
main results in DAGAppMaster having constructor with 8 arguments (already 
considered an anti-pattern by many), but bigger issue is that if/when new 
argument is introduced, such constructor will be modified thus introducing 
another breaking change that could have been easily avoided by making the 
structure and design of DAGAppMaster more stable.
Also, as you can see some of the tests need access to the actual instance of 
DAGAppMaster. I can't get access to such instance using 
_DAGAppMaster.main(..)_. This only leaves me with once choice and that is to 
repeat some of the main(..) logic in test itself, so keeping it simple aids in 
such testing.
Mocking is great and as you can see I do use it quite a lot when its 
appropriate, but it requires a lot of discipline since the behavior represented 
in mocks must represent the real thing, but as you already pointed out it does 
not.


> Lifecycle issues with DAGAppMaster
> ----------------------------------
>
>                 Key: TEZ-1206
>                 URL: https://issues.apache.org/jira/browse/TEZ-1206
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>            Reporter: Oleg Zhurakousky
>            Assignee: Oleg Zhurakousky
>         Attachments: TEZ-1206.patch, TEZ-1206.patch.2, TEZ-1206.patch.3.patch
>
>
> This is an umbrella issue to document and address issues with DAGAppMaster 
> lifecycle



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to