You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Sanjay Dahiya (JIRA)" <ji...@apache.org> on 2007/01/08 06:14:27 UTC

[jira] Created: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

bin/hadoop jar throws file creation exception for temp files
------------------------------------------------------------

                 Key: HADOOP-864
                 URL: https://issues.apache.org/jira/browse/HADOOP-864
             Project: Hadoop
          Issue Type: Bug
          Components: mapred
            Reporter: Sanjay Dahiya
            Priority: Minor


bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
$ bin/hadoop jar build/hadoop-streaming.jar 
Exception in thread "main" java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.checkAndCreate(File.java:1345)
        at java.io.File.createTempFile(File.java:1434)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:109)

it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Sanjay Dahiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanjay Dahiya updated HADOOP-864:
---------------------------------

    Assignee: Sanjay Dahiya
      Status: Patch Available  (was: Open)

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Cutting updated HADOOP-864:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Owen!

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.10.0
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>             Fix For: 0.10.1
>
>         Attachments: Hadoop-864-2.patch, Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-864:
---------------------------------

    Status: Patch Available  (was: Open)

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.10.0
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>             Fix For: 0.10.1
>
>         Attachments: Hadoop-864-2.patch, Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Sanjay Dahiya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462947 ] 

Sanjay Dahiya commented on HADOOP-864:
--------------------------------------

Patch attached. 

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Sanjay Dahiya
>            Priority: Minor
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463157 ] 

Owen O'Malley commented on HADOOP-864:
--------------------------------------

I edited the patch to call mkdirs and isDirectory in the right pattern.

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.10.0
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>             Fix For: 0.10.1
>
>         Attachments: Hadoop-864-2.patch, Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462970 ] 

Owen O'Malley commented on HADOOP-864:
--------------------------------------

The File interface is problematic to use with the boolean return codes, however, the better way to structure the calls is with:

tmpDir.mkdirs();
if (!tmpDir.exists()) { ... }

since that way, if two threads/processes both try to create the directory they both succeed. 

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-864:
---------------------------------

    Attachment: Hadoop-864-2.patch

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.10.0
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>             Fix For: 0.10.1
>
>         Attachments: Hadoop-864-2.patch, Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Sanjay Dahiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanjay Dahiya updated HADOOP-864:
---------------------------------

    Attachment: Hadoop-864.patch

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Sanjay Dahiya
>            Priority: Minor
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462948 ] 

Hadoop QA commented on HADOOP-864:
----------------------------------

+1, because http://issues.apache.org/jira/secure/attachment/12348477/Hadoop-864.patch applied and successfully tested against trunk revision r493236.

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HADOOP-864) bin/hadoop jar throws file creation exception for temp files

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-864:
---------------------------------

        Fix Version/s: 0.10.1
    Affects Version/s: 0.10.0
               Status: Open  (was: Patch Available)

> bin/hadoop jar throws file creation exception for temp files
> ------------------------------------------------------------
>
>                 Key: HADOOP-864
>                 URL: https://issues.apache.org/jira/browse/HADOOP-864
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.10.0
>            Reporter: Sanjay Dahiya
>         Assigned To: Sanjay Dahiya
>            Priority: Minor
>             Fix For: 0.10.1
>
>         Attachments: Hadoop-864.patch
>
>
> bin/hadoop throw file creation exception if hadoop.tmp.dir doesn't exist. 
> $ bin/hadoop jar build/hadoop-streaming.jar 
> Exception in thread "main" java.io.IOException: No such file or directory
>         at java.io.UnixFileSystem.createFileExclusively(Native Method)
>         at java.io.File.checkAndCreate(File.java:1345)
>         at java.io.File.createTempFile(File.java:1434)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:109)
> it should create the hadoop.tmp.dir before trying File.createTempFile

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira