Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 269B4186E6 for ; Mon, 18 Apr 2016 12:33:16 +0000 (UTC) Received: (qmail 16579 invoked by uid 500); 18 Apr 2016 12:33:15 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 16519 invoked by uid 500); 18 Apr 2016 12:33:15 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 16510 invoked by uid 99); 18 Apr 2016 12:33:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 12:33:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8461DDFB73; Mon, 18 Apr 2016 12:33:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: waltersu4549@apache.org To: common-commits@hadoop.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: hadoop git commit: HDFS-10275. TestDataNodeMetrics failing intermittently due to TotalWriteTime counted incorrectly. Contributed by Lin Yiqun. Date: Mon, 18 Apr 2016 12:33:15 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/branch-2.8 e9699aa44 -> 09ffc65d9 HDFS-10275. TestDataNodeMetrics failing intermittently due to TotalWriteTime counted incorrectly. Contributed by Lin Yiqun. (cherry picked from commit ab903029a9d353677184ff5602966b11ffb408b9) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/09ffc65d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/09ffc65d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/09ffc65d Branch: refs/heads/branch-2.8 Commit: 09ffc65d94f0ea18ac797ba5a4def0009db82d15 Parents: e9699aa Author: Walter Su Authored: Mon Apr 18 20:29:29 2016 +0800 Committer: Walter Su Committed: Mon Apr 18 20:32:36 2016 +0800 ---------------------------------------------------------------------- .../hadoop/hdfs/server/datanode/TestDataNodeMetrics.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/09ffc65d/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java index 5f9b602..355f7a1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java @@ -258,10 +258,9 @@ public class TestDataNodeMetrics { * and reading causes totalReadTime to move. * @throws Exception */ - @Test(timeout=60000) + @Test(timeout=120000) public void testDataNodeTimeSpend() throws Exception { Configuration conf = new HdfsConfiguration(); - SimulatedFSDataset.setFactory(conf); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); try { final FileSystem fs = cluster.getFileSystem(); @@ -284,6 +283,7 @@ public class TestDataNodeMetrics { DFSTestUtil.createFile(fs, new Path("/time.txt." + x.get()), LONG_FILE_LEN, (short) 1, Time.monotonicNow()); DFSTestUtil.readFile(fs, new Path("/time.txt." + x.get())); + fs.delete(new Path("/time.txt." + x.get()), true); } catch (IOException ioe) { LOG.error("Caught IOException while ingesting DN metrics", ioe); return false; @@ -294,7 +294,7 @@ public class TestDataNodeMetrics { return endWriteValue > startWriteValue && endReadValue > startReadValue; } - }, 30, 30000); + }, 30, 60000); } finally { if (cluster != null) { cluster.shutdown();