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:56:02 UTC
svn commit: r1188260 - in /hbase/branches/0.92: CHANGES.txt
src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
Author: tedyu
Date: Mon Oct 24 17:56:01 2011
New Revision: 1188260
URL: http://svn.apache.org/viewvc?rev=1188260&view=rev
Log:
HBASE-4651 ConcurrentModificationException might be thrown in
TestHCM.testConnectionUniqueness (Jinchao)
Modified:
hbase/branches/0.92/CHANGES.txt
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1188260&r1=1188259&r2=1188260&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Mon Oct 24 17:56:01 2011
@@ -369,6 +369,8 @@ Release 0.92.0 - Unreleased
HBASE-4479 TestMasterFailover failure in Hbase-0.92#17 (Ram)
HBASE-4589 CacheOnWrite broken in some cases because it can conflict
with evictOnClose (jgray)
+ HBASE-4651 ConcurrentModificationException might be thrown in
+ TestHCM.testConnectionUniqueness (Jinchao)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
Modified: hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java?rev=1188260&r1=1188259&r2=1188260&view=diff
==============================================================================
--- hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java (original)
+++ hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java Mon Oct 24 17:56:01 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
+}