[ 
https://issues.apache.org/jira/browse/HADOOP-9843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13732762#comment-13732762
 ] 

Chris Nauroth commented on HADOOP-9843:
---------------------------------------

Kousuke, thanks for the quick turn-around!  When I run these tests on branch-1, 
each test fails with {{NullPointerException}}.  Are you seeing the same?  I 
expect this is because the tests are mocking some very specific file system API 
calls, and the {{DiskChecker}} code is slightly different between trunk and 
branch-1.

{code}
java.lang.NullPointerException
        at 
org.apache.hadoop.util.DiskChecker.mkdirsWithExistsAndPermissionCheck(DiskChecker.java:135)
        at 
org.apache.hadoop.util.TestDiskChecker._mkdirs(TestDiskChecker.java:75)
        at 
org.apache.hadoop.util.TestDiskChecker.testMkdirs_dirExists(TestDiskChecker.java:45)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:680)

{code}

Also, it looks like we'll need a separate patch for branch-1-win for Windows 
compatibility due to the hard-coded chmod calls like:

{code}
    String[] cmd = {"chmod", String.format("%04o ", perm.toShort()), 
      localDir.getAbsolutePath()};
    new ShellCommandExecutor(cmd, null, null, 0).execute();
{code}

For the branch-1-win patch, I expect it would work to convert this to what we 
use on trunk:

{code}
    Shell.execCommand(Shell.getSetPermissionCommand(String.format("%04o",
      perm.toShort()), false, localDir.getAbsolutePath()));
{code}

If you don't have a Windows machine ready to go for testing, then I can 
volunteer to run the tests for you on Windows.

                
> Backport TestDiskChecker to branch-1.
> -------------------------------------
>
>                 Key: HADOOP-9843
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9843
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: test, util
>    Affects Versions: 1-win, 1.3.0
>            Reporter: Chris Nauroth
>            Priority: Minor
>              Labels: newbie
>         Attachments: HADOOP-9843.patch
>
>
> In trunk, we have the {{TestDiskChecker}} test suite to cover the code in 
> {{DiskChecker}}.  It would be good to backport this test suite to branch-1 
> and branch-1-win to get coverage of the code in those branches too.

--
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