hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1407289 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
Date Thu, 08 Nov 2012 22:11:10 GMT
Author: enis
Date: Thu Nov  8 22:11:10 2012
New Revision: 1407289

URL: http://svn.apache.org/viewvc?rev=1407289&view=rev
Log:
HBASE-6823. [WINDOWS] TestSplitTransaction fails due to the Log handle not released by a call
to DaughterOpener.start()

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java?rev=1407289&r1=1407288&r2=1407289&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
Thu Nov  8 22:11:10 2012
@@ -248,12 +248,9 @@ public class TestSplitTransaction {
     assertTrue(Bytes.equals(GOOD_SPLIT_ROW, daughters.getFirst().getEndKey()));
     assertTrue(Bytes.equals(daughters.getSecond().getStartKey(), GOOD_SPLIT_ROW));
     assertTrue(Bytes.equals(this.parent.getEndKey(), daughters.getSecond().getEndKey()));
-    // Count rows.
+    // Count rows. daughters are already open
     int daughtersRowCount = 0;
-    for (HRegion r: daughters) {
-      // Open so can count its content.
-      HRegion openRegion = HRegion.openHRegion(this.testdir, r.getRegionInfo(),
-         r.getTableDesc(), r.getLog(), TEST_UTIL.getConfiguration());
+    for (HRegion openRegion: daughters) {
       try {
         int count = countRows(openRegion);
         assertTrue(count > 0 && count != rowcount);
@@ -303,12 +300,9 @@ public class TestSplitTransaction {
     // Now retry the split but do not throw an exception this time.
     assertTrue(st.prepare());
     PairOfSameType<HRegion> daughters = st.execute(mockServer, null);
-    // Count rows.
+    // Count rows. daughters are already open
     int daughtersRowCount = 0;
-    for (HRegion r: daughters) {
-      // Open so can count its content.
-      HRegion openRegion = HRegion.openHRegion(this.testdir, r.getRegionInfo(),
-         r.getTableDesc(), r.getLog(), TEST_UTIL.getConfiguration());
+    for (HRegion openRegion: daughters) {
       try {
         int count = countRows(openRegion);
         assertTrue(count > 0 && count != rowcount);



Mime
View raw message