You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cn...@apache.org on 2015/06/08 17:44:26 UTC
[1/2] hadoop git commit: HDFS-8554. TestDatanodeLayoutUpgrade fails
on Windows. Contributed by Chris Nauroth.
Repository: hadoop
Updated Branches:
refs/heads/branch-2 c3c2b4d31 -> 8ee50d8ca
refs/heads/trunk 18f680977 -> 0e80d5198
HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/0e80d519
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/0e80d519
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/0e80d519
Branch: refs/heads/trunk
Commit: 0e80d51983942dca3348c8a8401bad3ecbaab010
Parents: 18f6809
Author: cnauroth <cn...@apache.org>
Authored: Mon Jun 8 08:39:02 2015 -0700
Committer: cnauroth <cn...@apache.org>
Committed: Mon Jun 8 08:39:02 2015 -0700
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/fs/FileUtil.java | 6 ++++++
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++
.../org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java | 8 ++++----
3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/0e80d519/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
index 5fd89c4..9b9e213 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
@@ -731,6 +731,12 @@ public class FileUtil {
}
}
+ 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(
http://git-wip-us.apache.org/repos/asf/hadoop/blob/0e80d519/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 853a022..73574b6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -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
http://git-wip-us.apache.org/repos/asf/hadoop/blob/0e80d519/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
index 343320c..224abea 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
@@ -37,11 +37,11 @@ public class TestDatanodeLayoutUpgrade {
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);
}
[2/2] hadoop git commit: HDFS-8554. TestDatanodeLayoutUpgrade fails
on Windows. Contributed by Chris Nauroth.
Posted by cn...@apache.org.
HDFS-8554. TestDatanodeLayoutUpgrade fails on Windows. Contributed by Chris Nauroth.
(cherry picked from commit 0e80d51983942dca3348c8a8401bad3ecbaab010)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8ee50d8c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8ee50d8c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8ee50d8c
Branch: refs/heads/branch-2
Commit: 8ee50d8ca7df7ebde0a12c2ff6312b3b449e40ec
Parents: c3c2b4d
Author: cnauroth <cn...@apache.org>
Authored: Mon Jun 8 08:39:02 2015 -0700
Committer: cnauroth <cn...@apache.org>
Committed: Mon Jun 8 08:39:14 2015 -0700
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/fs/FileUtil.java | 6 ++++++
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++
.../org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java | 8 ++++----
3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/8ee50d8c/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
index 91f00e1..7a340fc 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
@@ -727,6 +727,12 @@ public class FileUtil {
}
}
+ 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(
http://git-wip-us.apache.org/repos/asf/hadoop/blob/8ee50d8c/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 63a128a..ed484ad 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -527,6 +527,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
http://git-wip-us.apache.org/repos/asf/hadoop/blob/8ee50d8c/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
index 343320c..224abea 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeLayoutUpgrade.java
@@ -37,11 +37,11 @@ public class TestDatanodeLayoutUpgrade {
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);
}