-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/62459/#review186053
-----------------------------------------------------------



My overall impression:

1. The class is too big, almost 1000 lines. Would it be possible to break it up 
somehow? I think the most obvious way to do is put different collector logics 
into different classes.
2. Code is strongly coupled with I/O operations, making it hard to test. 
Certain stuff, like filesystem operations (exists/mkdir) and stream creation 
should be wrapped and injected. See LocalFsOperations in oozie-sharelib. That 
way you can avoid direct IO. A mock factory for creating streams makes testing 
extremely easy because it can just return a StringWriter which can be examined 
in the tests.

- Peter Bacsko


On szept. 22, 2017, 12:50 du, Attila Sasvari wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62459/
> -----------------------------------------------------------
> 
> (Updated szept. 22, 2017, 12:50 du)
> 
> 
> Review request for oozie.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> A diagnostic tool that collects a bunch of job and other information from 
> Oozie in a zip file.
> 
> 
> Diffs
> -----
> 
>   docs/src/site/twiki/DG_CommandLineTool.twiki 
> d4047671876dcc3279a2ec379bc1d003f5e6f1aa 
>   pom.xml efccc346932514ada578a3462eb3c3cfe519a323 
>   tools/pom.xml 7306a14e7b237977be00f8fe28e34573540fd508 
>   tools/src/main/bin/oozie-diag-bundle-collector.sh PRE-CREATION 
>   tools/src/main/java/org/apache/oozie/tools/OozieDiagBundleCollector.java 
> PRE-CREATION 
>   
> tools/src/test/java/org/apache/oozie/tools/TestOozieDiagBundleCollector.java 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/62459/diff/3/
> 
> 
> Testing
> -------
> 
> - new unit tests: TestOozieDiagBundleCollector
> - started Oozie with a pseudo hadoop cluster, submitted a couple workflows, 
> and executed the following commands: 
> -- ``bin/oozie-diag-bundle-collector.sh`` (usage info printed),
> -- ``bin/oozie-diag-bundle-collector.sh  -numworkflows 2000 -oozie 
> http://localhost:11000/oozie -output /tmp``, 
> -- ``bin/oozie-diag-bundle-collector.sh  -jobs 
> 0000001-170918144116149-oozie-asas-W -oozie http://localhost:11000/oozie 
> -output .`` (verified zip the tool generated).
> 
> 
> Thanks,
> 
> Attila Sasvari
> 
>

Reply via email to