You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2011/10/24 19:52:40 UTC
svn commit: r1188259 - in /hbase/trunk: CHANGES.txt
src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
Author: tedyu
Date: Mon Oct 24 17:52:39 2011
New Revision: 1188259
URL: http://svn.apache.org/viewvc?rev=1188259&view=rev
Log:
HBASE-4651 ConcurrentModificationException might be thrown in
TestHCM.testConnectionUniqueness (Jinchao)
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1188259&r1=1188258&r2=1188259&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Mon Oct 24 17:52:39 2011
@@ -399,6 +399,8 @@ Release 0.92.0 - Unreleased
HBASE-4492 TestRollingRestart fails intermittently (Ted Yu and Ram)
HBASE-4512 JVMClusterUtil throwing wrong exception when master thread cannot be created (Ram)
HBASE-4479 TestMasterFailover failure in Hbase-0.92#17(Ram)
+ HBASE-4651 ConcurrentModificationException might be thrown in
+ TestHCM.testConnectionUniqueness (Jinchao)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java?rev=1188259&r1=1188258&r2=1188259&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java Mon Oct 24 17:52:39 2011
@@ -105,15 +105,11 @@ public class TestHCM {
// to remove them, so the LRU strategy does not work.
configuration.set("someotherkey", String.valueOf(_randy.nextInt()));
last = connection;
- LOG.info("Cache Size: "
- + getHConnectionManagerCacheSize() + ", Valid Keys: "
- + getValidKeyCount());
+ LOG.info("Cache Size: " + getHConnectionManagerCacheSize());
Thread.sleep(100);
}
Assert.assertEquals(1,
getHConnectionManagerCacheSize());
- Assert.assertEquals(1,
- getValidKeyCount());
}
private static int getHConnectionManagerCacheSize()
@@ -126,21 +122,6 @@ public class TestHCM {
return cache.size();
}
- private static int getValidKeyCount() throws SecurityException,
- NoSuchFieldException, IllegalArgumentException,
- IllegalAccessException {
- Field cacheField =
- HConnectionManager.class.getDeclaredField("HBASE_INSTANCES");
- cacheField.setAccessible(true);
- Map<?, ?> cache = (Map<?, ?>) cacheField.get(null);
- List<Object> keys = new ArrayList<Object>(cache.keySet());
- Set<Object> values = new HashSet<Object>();
- for (Object key : keys) {
- values.add(cache.get(key));
- }
- return values.size();
- }
-
/**
* Test that when we delete a location using the first row of a region
* that we really delete it.
@@ -220,9 +201,8 @@ public class TestHCM {
previousConnection = currentConnection;
LOG.info("The current HConnectionManager#HBASE_INSTANCES cache size is: "
- + getHConnectionManagerCacheSize()
- + ", and the number of valid keys is: " + getValidKeyCount());
+ + getHConnectionManagerCacheSize());
Thread.sleep(50);
}
}
-}
\ No newline at end of file
+}