[
https://issues.apache.org/jira/browse/YARN-4994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15272772#comment-15272772
]
Andras Bokor commented on YARN-4994:
------------------------------------
Hi [~jzhuge],
In the last two days I tried many different combinations to find out why the
tests are failing.
In YARN-5034 you can see my last patch (patch 12). I changed only stop method
to close and the tests failed.
It does not make sense for me at all. Close() calls stop. How can it ruin the
test results? It seems not-intermittent. Always the same tests are failing I
can reproduce builds with no error.
Do you have idea? It is very strange.
> Use MiniYARNCluster with try-with-resources in tests
> ----------------------------------------------------
>
> Key: YARN-4994
> URL: https://issues.apache.org/jira/browse/YARN-4994
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: test
> Affects Versions: 2.7.0
> Reporter: Andras Bokor
> Assignee: Andras Bokor
> Priority: Trivial
> Fix For: 2.7.0
>
> Attachments: HDFS-10287.01.patch, HDFS-10287.02.patch,
> HDFS-10287.03.patch
>
>
> In tests MiniYARNCluster is used with the following pattern:
> In try-catch block create a MiniYARNCluster instance and in finally block
> close it.
> [Try-with-resources|https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html]
> is preferred since Java7 instead of the pattern above.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]