From 0f57c35465aae39c96a38f718be31d882c6ff9f1 Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Thu, 17 Mar 2011 05:59:29 +0000 Subject: [PATCH] HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1082403 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../apache/hadoop/hbase/regionserver/wal/TestHLog.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 4f9216532da..28972fe7ab6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -170,6 +170,7 @@ Release 0.90.2 - Unreleased HBASE-3648 [replication] failover is sloppy with znodes HBASE-3613 NPE in MemStoreFlusher HBASE-3650 HBA.delete can return too fast + HBASE-3659 Fix TestHLog to pass on newer versions of Hadoop IMPROVEMENTS HBASE-3542 MultiGet methods in Thrift diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java index 64519375491..cb57dbbf24c 100644 --- a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java +++ b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLog.java @@ -111,6 +111,8 @@ public class TestHLog { .setInt("ipc.client.connect.max.retries", 1); TEST_UTIL.getConfiguration().setInt( "dfs.client.block.recovery.retries", 1); + TEST_UTIL.getConfiguration().setInt( + "ipc.client.connection.maxidletime", 500); TEST_UTIL.getConfiguration().set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, SampleRegionWALObserver.class.getName()); TEST_UTIL.startMiniCluster(3); @@ -371,6 +373,13 @@ public class TestHLog { LOG.error("Waiting for cluster to go down"); Thread.sleep(1000); } + + // Workaround a strange issue with Hadoop's RPC system - if we don't + // sleep here, the new datanodes will pick up a cached IPC connection to + // the old (dead) NN and fail to start. Sleeping 2 seconds goes past + // the idle time threshold configured in the conf above + Thread.sleep(2000); + cluster = new MiniDFSCluster(namenodePort, conf, 5, false, true, true, null, null, null, null); cluster.waitActive(); fs = cluster.getFileSystem();