Skip to content

Commit

Permalink
HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by…
Browse files Browse the repository at this point in the history
… Chris Nauroth.
  • Loading branch information
cnauroth committed Jun 8, 2015
1 parent 18f6809 commit 0e80d51
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,12 @@ private static void unpackEntries(TarArchiveInputStream tis,
}
}

if (entry.isLink()) {
File src = new File(outputDir, entry.getLinkName());
HardLink.createHardLink(src, outputFile);
return;
}

int count;
byte data[] = new byte[2048];
BufferedOutputStream outputStream = new BufferedOutputStream(
Expand Down
2 changes: 2 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ Release 2.8.0 - UNRELEASED
HDFS-8539. Hdfs doesnt have class 'debug' in windows.
(Anu Engineer via cnauroth)

HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. (cnauroth)

Release 2.7.1 - UNRELEASED

INCOMPATIBLE CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public void testUpgradeToIdBasedLayout() throws IOException {
upgrade.unpackStorage(HADOOP24_DATANODE, HADOOP_DATANODE_DIR_TXT);
Configuration conf = new Configuration(TestDFSUpgradeFromImage.upgradeConf);
conf.set(DFSConfigKeys.DFS_DATANODE_DATA_DIR_KEY,
System.getProperty("test.build.data") + File.separator +
"dfs" + File.separator + "data");
new File(System.getProperty("test.build.data"),
"dfs" + File.separator + "data").toURI().toString());
conf.set(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_KEY,
System.getProperty("test.build.data") + File.separator +
"dfs" + File.separator + "name");
new File(System.getProperty("test.build.data"),
"dfs" + File.separator + "name").toURI().toString());
upgrade.upgradeAndVerify(new MiniDFSCluster.Builder(conf).numDataNodes(1)
.manageDataDfsDirs(false).manageNameDfsDirs(false), null);
}
Expand Down

0 comments on commit 0e80d51

Please sign in to comment.