[
https://issues.apache.org/jira/browse/TEZ-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14142464#comment-14142464
]
Prakash Ramachandran edited comment on TEZ-1550 at 9/21/14 2:39 PM:
--------------------------------------------------------------------
patch 2 changes ( applies on both trunk and 0.5 branches)
- changed package to o.a.t.common
- tested using TestEnvironmentUpdateUtils on linux (both jdk2.6 and 2.7) and
windows
- ran examples in localmode (wordcount, orderedwordcount, join) on linux
root cause:
In localmode some of the environment variables set by yarn while launching the
container have to be set manually (this is done in localcontainer launcher).
The getenv returns a map (wrapped in unmodifiable) which is created at the
begining. since java does not support a setenv, the function used reflection
to get reference to the underlying map and directly add entries there.
The actual variable used to store the env data differs between linux and
windows.
linux: getenv returns type java.util.Collections$UnmodifiableMap, which stores
actual data in member variable "m"
windows: actual env map is store in the 2 static variables in
java.lang.PRocessEnvironment
The only usage of the put function is limited to local mode and unit tests.
we should look at replacing this as this not a clean solution.
was (Author: pramachandran):
patch 2 changes
- changed package to o.a.t.common
- tested using TestEnvironmentUpdateUtils on linux (both jdk2.6 and 2.7) and
windows
- ran examples in localmode (wordcount, orderedwordcount, join) on linux
root cause:
In localmode some of the environment variables set by yarn while launching the
container have to be set manually (this is done in localcontainer launcher).
The getenv returns a map (wrapped in unmodifiable) which is created at the
begining. since java does not support a setenv, the function used reflection
to get reference to the underlying map and directly add entries there.
The actual variable used to store the env data differs between linux and
windows.
linux: getenv returns type java.util.Collections$UnmodifiableMap, which stores
actual data in member variable "m"
windows: actual env map is store in the 2 static variables in
java.lang.PRocessEnvironment
The only usage of the put function is limited to local mode and unit tests.
we should look at replacing this as this not a clean solution.
> TestEnvironmentUpdateUtils.testMultipleUpdateEnvironment fails on Windows
> --------------------------------------------------------------------------
>
> Key: TEZ-1550
> URL: https://issues.apache.org/jira/browse/TEZ-1550
> Project: Apache Tez
> Issue Type: Sub-task
> Reporter: Hitesh Shah
> Assignee: Prakash Ramachandran
> Attachments: tez-1550.1.patch, tez-1550.2.patch
>
>
> Error Message
> Environment was not set propertly expected:<test.value1> but was:<null>
> Stacktrace
> java.lang.AssertionError: Environment was not set propertly
> expected:<test.value1> but was:<null>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at
> org.apache.tez.dag.utils.TestEnvironmentUpdateUtils.testMultipleUpdateEnvironment(TestEnvironmentUpdateUtils.java:31)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)