hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Yamijala (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-1301) TestDebugScriptWithLinuxTaskController fails
Date Fri, 18 Dec 2009 10:41:18 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792428#action_12792428

Hemanth Yamijala commented on MAPREDUCE-1301:

I tried to see why we failed to catch this in MAPREDUCE-879. The core issue here is that there
are two APIs in TestTaskTrackerLocalization - checkFilePermissions and setupPermissionScriptDir(File)
which are related to each other. I.e. the former requires the latter to have been called.
But they are static and thus hide this dependency. In the review, it didn't occur to me that
I should check for callers of checkFilePermissions and verify this dependency is satisfied
by other callers (like TestDebugScriptWithLinuxTaskController), as the API was not touched
in the patch.

As a result of that, I am tending to think that others will make the same mistake in future
as well. I.e, they may think there's no dependency between these APIs and call only checkFilePermissions
without calling setupPermissionScriptDir.

So, though the attached patch actually fixes the issue for this test case, I would like to
see an approach that goes beyond the fix and prevents these problems in future as well. Makes
sense ?

> TestDebugScriptWithLinuxTaskController fails 
> ---------------------------------------------
>                 Key: MAPREDUCE-1301
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1301
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.21.0
>            Reporter: Amareshwari Sriramadasu
>             Fix For: 0.21.0
>         Attachments: patch-1301.txt
> After MAPREDUCE:879,  TestDebugScriptWithLinuxTaskController fails with following exception
> java.lang.NullPointerException
> 	at org.apache.hadoop.mapred.TestTaskTrackerLocalization.getFilePermissionAttrs(TestTaskTrackerLocalization.java:274)
> 	at org.apache.hadoop.mapred.TestTaskTrackerLocalization.checkFilePermissions(TestTaskTrackerLocalization.java:294)
> 	at org.apache.hadoop.mapred.TestDebugScript.verifyDebugScriptOutput(TestDebugScript.java:162)
> 	at org.apache.hadoop.mapred.TestDebugScriptWithLinuxTaskController.testDebugScriptExecutionAsDifferentUser(TestDebugScriptWithLinuxTaskController.java:50)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message