You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Luca Telloli (JIRA)" <ji...@apache.org> on 2009/07/06 19:51:15 UTC
[jira] Created: (HDFS-462) Unit tests not working under Windows
Unit tests not working under Windows
------------------------------------
Key: HDFS-462
URL: https://issues.apache.org/jira/browse/HDFS-462
Project: Hadoop HDFS
Issue Type: Bug
Components: test
Reporter: Luca Telloli
Unit tests are failing on windows due to a problem with rename.
The failing code is around line 520 in FSImage.java:
{noformat}
assert curDir.exists() : "Current directory must exist.";
assert !prevDir.exists() : "prvious directory must not exist.";
assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
// rename current to tmp
rename(curDir, tmpDir);
// save new image
if (!curDir.mkdir())
throw new IOException("Cannot create directory " + curDir);
{noformat}
and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-462) Unit tests not working under Windows
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729646#action_12729646 ]
Hadoop QA commented on HDFS-462:
--------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12413051/HDFS-462.patch
against trunk revision 792881.
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed core unit tests.
-1 contrib tests. The patch failed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/15/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/15/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/15/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/15/console
This message is automatically generated.
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HDFS-462) Unit tests not working under Windows
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan reassigned HDFS-462:
--------------------------------
Assignee: Jakob Homan
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-462) Unit tests not working under Windows
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730518#action_12730518 ]
Jakob Homan commented on HDFS-462:
----------------------------------
Again, no new tests as is fixing a defect that's being caught by the current unit tests (under Windows at least). Patch is ready to go.
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-462) Unit tests not working under Windows
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan updated HDFS-462:
-----------------------------
Status: Patch Available (was: Open)
submitting patch
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-462) Unit tests not working under Windows
Posted by "Jakob Homan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan updated HDFS-462:
-----------------------------
Attachment: HDFS-462.patch
Attaching patch that fixes problem. Konstantin tested on his Windows box and it worked. Passes unit tests. Nicholas, I don't believe your issue is due to this problem, but rather from the URI patch that's related to this one.
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-462) Unit tests not working under Windows
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729438#action_12729438 ]
Konstantin Shvachko commented on HDFS-462:
------------------------------------------
Nicholas your case falls under HDFS-456. See error messages before that complaining the path is not a uri.
Checked the patch on windows. TestDistributedUpgrade passes with, fails without it.
+1
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-462) Unit tests not working under Windows
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Shvachko updated HDFS-462:
-------------------------------------
Component/s: name-node
Environment: Windows
Affects Version/s: 0.21.0
Fix Version/s: 0.21.0
Yes, as we traced with Luca, the rename of {{current}} to {{previous.tmp}} fails because {{current/edits}} remains open after {{loadFSImaeg()}}. WinNT does not let rename directories if there are open files in it. This was introduced by HADOOP-5314. For regular name-node start up this makes sense, but fails in other scenarios.
We should really-really resurrect windows build at least once a week as we used to have.
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Fix For: 0.21.0
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HDFS-462) Unit tests not working under Windows
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731522#action_12731522 ]
Hudson commented on HDFS-462:
-----------------------------
Integrated in Hadoop-Hdfs-trunk #23 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/23/])
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-462) Unit tests not working under Windows
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE updated HDFS-462:
----------------------------------------
Attachment: TEST-org.apache.hadoop.hdfs.TestHdfs.txt
MiniDFSCluster also does not work in Windows.
{code}
//The following test failed in Windows.
//See also the attached log TEST-org.apache.hadoop.hdfs.TestHdfs.txt
public class TestHdfs extends junit.framework.TestCase {
public void testHdfs() throws IOException {
new MiniDFSCluster(new Configuration(), 1, true, null);
}
}
{code}
{noformat}
Testcase: testHdfs took 1.219 sec
Caused an ERROR
All specified directories are not accessible or do not exist.
java.io.IOException: All specified directories are not accessible or do not exist.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:370)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:99)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:255)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:236)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:254)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:299)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:405)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:399)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1159)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:276)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:120)
at org.apache.hadoop.hdfs.TestHdfs.testHdfs(TestHdfs.java:25)
{noformat}
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HDFS-462) Unit tests not working under Windows
Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HDFS-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Shvachko updated HDFS-462:
-------------------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
I just committed this. Thank you Jakob.
> Unit tests not working under Windows
> ------------------------------------
>
> Key: HDFS-462
> URL: https://issues.apache.org/jira/browse/HDFS-462
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node, test
> Affects Versions: 0.21.0
> Environment: Windows
> Reporter: Luca Telloli
> Assignee: Jakob Homan
> Fix For: 0.21.0
>
> Attachments: HDFS-462.patch, TEST-org.apache.hadoop.hdfs.TestHdfs.txt
>
>
> Unit tests are failing on windows due to a problem with rename.
> The failing code is around line 520 in FSImage.java:
> {noformat}
> assert curDir.exists() : "Current directory must exist.";
> assert !prevDir.exists() : "prvious directory must not exist.";
> assert !tmpDir.exists() : "prvious.tmp directory must not exist.";
> // rename current to tmp
> rename(curDir, tmpDir);
> // save new image
> if (!curDir.mkdir())
> throw new IOException("Cannot create directory " + curDir);
> {noformat}
> and seems related to some open file or directory
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.