From 5f9c37562d040b264bb3a1a13857f56f42f3b97f Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Fri, 31 Aug 2012 20:37:29 +0000 Subject: [PATCH] HDFS-3833. Merging 1379525 from trunk. Contributed by Brandon Li git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1379594 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 8 ++++++-- .../test/java/org/apache/hadoop/hdfs/TestDFSShell.java | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index acc89b1fb25..9305e01d558 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -529,6 +529,12 @@ Release 2.0.1-alpha - UNRELEASED HDFS-3733. Audit logs should include WebHDFS access. (Andy Isaacson via eli) + HDFS-2686. Remove DistributedUpgrade related code. (suresh) + + HDFS-3833. TestDFSShell fails on windows due to concurrent file + read/write. (Brandon Li via suresh) + + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) @@ -545,8 +551,6 @@ Release 2.0.1-alpha - UNRELEASED HDFS-3432. TestDFSZKFailoverController tries to fail over too early (todd) - HDFS-2686. Remove DistributedUpgrade related code. (suresh) - Release 2.0.0-alpha - 05-23-2012 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java index 4387fb75a8c..1ebef6db51b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java @@ -1284,6 +1284,11 @@ public class TestDFSShell { public void testGet() throws IOException { DFSTestUtil.setLogLevel2All(FSInputChecker.LOG); final Configuration conf = new HdfsConfiguration(); + // Race can happen here: block scanner is reading the file when test tries + // to corrupt the test file, which will fail the test on Windows platform. + // Disable block scanner to avoid this race. + conf.setInt(DFSConfigKeys.DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, -1); + MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build(); DistributedFileSystem dfs = (DistributedFileSystem)cluster.getFileSystem();