accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-2397 dirty the !METADATA table a second time to ensure the file list changes
Date Mon, 24 Feb 2014 18:40:13 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT d398aadbd -> 5a39a0334


ACCUMULO-2397 dirty the !METADATA table a second time to ensure the file list changes


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5a39a033
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5a39a033
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5a39a033

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 5a39a03341209d20c67a1fbd25876a2fca9bd83b
Parents: d398aad
Author: Eric Newton <eric.newton@gmail.com>
Authored: Mon Feb 24 13:40:23 2014 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Mon Feb 24 13:40:23 2014 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/test/functional/MetadataIT.java   | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5a39a033/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
index 6c9f27a..e092a01 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java
@@ -46,9 +46,10 @@ public class MetadataIT extends SimpleMacIT {
   @Test(timeout = 60 * 1000)
   public void testFlushAndCompact() throws Exception {
     Connector c = getConnector();
-
+    String tableNames[] = getTableNames(2);
+    
     // create a table to write some data to metadata table
-    c.tableOperations().create(super.getTableNames(1)[0]);
+    c.tableOperations().create(tableNames[0]);
 
     Scanner rootScanner = c.createScanner(RootTable.NAME, Authorizations.EMPTY);
     rootScanner.setRange(MetadataSchema.TabletsSection.getRange());
@@ -58,6 +59,7 @@ public class MetadataIT extends SimpleMacIT {
     for (Entry<Key,Value> entry : rootScanner)
       files1.add(entry.getKey().getColumnQualifier().toString());
 
+    c.tableOperations().create(tableNames[1]);
     c.tableOperations().flush(MetadataTable.NAME, null, null, true);
 
     Set<String> files2 = new HashSet<String>();
@@ -72,8 +74,8 @@ public class MetadataIT extends SimpleMacIT {
 
     Set<String> files3 = new HashSet<String>();
     for (Entry<Key,Value> entry : rootScanner)
-
       files3.add(entry.getKey().getColumnQualifier().toString());
+    
     // compaction of metadata table should change file set in root table
     Assert.assertNotEquals(files2, files3);
   }
@@ -116,6 +118,7 @@ public class MetadataIT extends SimpleMacIT {
       if (e != null)
         count++;
     }
+    s.close();
     assertTrue(count > 0);
 
     // batch scan root metadata table
@@ -126,6 +129,7 @@ public class MetadataIT extends SimpleMacIT {
       if (e != null)
         count++;
     }
+    s.close();
     assertTrue(count > 0);
   }
 


Mime
View raw message