[ 
https://issues.apache.org/jira/browse/MAPREDUCE-5514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhijie Shen updated MAPREDUCE-5514:
-----------------------------------

    Attachment: MAPREDUCE-5514.2.patch

I've done more investigation on the test failure, and found the test is broken 
due to YARN-1027.

In the patch of YARN-1027, ResourceManager#clusterTimeStamp is reset every time 
RM starts. Previously, its a static variable which is initiated when 
ResourceManager is referred. Moreover, clusterTimeStamp is used to create the 
application ID, and consequently the application attempt ID.

Therefore, before YARN-1027, all the tests in TestRMContainerAllocator get the 
same application attempt ID (because clusterTimeStamp is initiated once when 
ResourceManager is referred), while after YARN-1027, each test gets a different 
application attempt ID (because clusterTimeStamp reset in each test).

Then, MyContainerAllocator uses the application attempt ID as the login user 
name. Each test will set login user in UserGroupInformation. One issue here is 
the loginUser setting in the previous test is visible to the current test, 
because UserGroupInformation#loginUser is the static variable.

Therefore, in testReportedAppProgress and testReportedAppProgressWithOnlyMaps, 
when job.xml is written, the user name, which is the application attempt id set 
in the last test, while TaskAttemptImpl tries to read job.xml with another user 
name, which is the application attempt id set in the current test.

To sum up, the straightforward way to fix the test is to ensure 
ResourceManager#clusterTimeStamp consistent throughout the tests in 
TestRMContainerAllocator
                
> TestRMContainerAllocator fails on trunk
> ---------------------------------------
>
>                 Key: MAPREDUCE-5514
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5514
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Zhijie Shen
>            Assignee: Zhijie Shen
>            Priority: Blocker
>         Attachments: MAPREDUCE-5514.1.patch, MAPREDUCE-5514.2.patch, 
> org.apache.hadoop.mapreduce.v2.app.TestRMContainerAllocator-output.txt
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to