[
https://issues.apache.org/jira/browse/APEXCORE-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16143386#comment-16143386
]
Vlad Rozov commented on APEXCORE-779:
-------------------------------------
It was sufficient to
# delete code in unit tests that was checking for $JAVA_HOME environment and if
it was not set, changing containers to use java found using PATH. JAVA_HOME is
always set by Yarn when a container is launched, so we can reliably use
${JAVA_HOME}/bin/java.
# There was already code that sets JAVA_HOME to "java.home" property
# It was necessary to remove JAVA_HOME from Yarn white list in unit test
(JAVA_HOME is whitelisted by default).
In the past Apex included "MALLOC_ARENA_MAX=4" into the Yarn NM_ADMIN_USER_ENV
configuration setting, but it is not necessary for unit test (not production
cluster).
> In unit tests Yarn containers must use the same JVM as the test itself.
> -----------------------------------------------------------------------
>
> Key: APEXCORE-779
> URL: https://issues.apache.org/jira/browse/APEXCORE-779
> Project: Apache Apex Core
> Issue Type: Bug
> Reporter: Vlad Rozov
> Assignee: Vlad Rozov
> Priority: Minor
>
> When Yarn containers are launched from a unit test, they should use
> "java.home" property to find what java executable to use as JAVA_HOME may
> point not to a proper location. Using PATH to find java must be avoided, as
> the default java on a test box may be a wrong version or not a properly
> configured JVM.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)