accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/9] git commit: ACCUMULO-2037 Close scanner
Date Sat, 23 Aug 2014 00:37:52 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT 705a60d19 -> 23c74cd44
  refs/heads/master d4d573347 -> 21d3c88d8


ACCUMULO-2037 Close scanner


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: ac2e60164626e51e5932d0c30c6b4b68ea1414c1
Parents: 705a60d
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Aug 22 19:54:50 2014 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Aug 22 19:54:50 2014 -0400

----------------------------------------------------------------------
 .../accumulo/test/functional/MasterAssignmentIT.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ac2e6016/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
index 298466d..46f6b23 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MasterAssignmentIT.java
@@ -35,7 +35,7 @@ import org.apache.hadoop.io.Text;
 import org.junit.Test;
 
 public class MasterAssignmentIT extends SimpleMacIT {
-  
+
   @Override
   protected int defaultTimeoutSeconds() {
     return 2 * 60;
@@ -55,7 +55,7 @@ public class MasterAssignmentIT extends SimpleMacIT {
     } while (newTablet.current == null);
     assertNull(newTablet.last);
     assertNull(newTablet.future);
-    
+
     // put something in it
     BatchWriter bw = c.createBatchWriter(tableName, new BatchWriterConfig());
     Mutation m = new Mutation("a");
@@ -64,19 +64,19 @@ public class MasterAssignmentIT extends SimpleMacIT {
     bw.close();
     // give it a last location
     c.tableOperations().flush(tableName, null, null, true);
-    
+
     TabletLocationState flushed = getTabletLocationState(c, tableId);
     assertEquals(newTablet.current, flushed.current);
     assertEquals(flushed.current, flushed.last);
     assertNull(newTablet.future);
-    
+
     // take the tablet offline
     c.tableOperations().offline(tableName, true);
     TabletLocationState offline = getTabletLocationState(c, tableId);
     assertNull(offline.future);
     assertNull(offline.current);
     assertEquals(flushed.current, offline.last);
-    
+
     // put it back online
     c.tableOperations().online(tableName, true);
     TabletLocationState online = getTabletLocationState(c, tableId);
@@ -88,6 +88,8 @@ public class MasterAssignmentIT extends SimpleMacIT {
   private TabletLocationState getTabletLocationState(Connector c, String tableId) {
     Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD));
     MetaDataTableScanner s = new MetaDataTableScanner(c.getInstance(), creds, new Range(KeyExtent.getMetadataEntry(new
Text(tableId), null)));
-    return s.next();
+    TabletLocationState tlState = s.next();
+    s.close();
+    return tlState;
   }
 }


Mime
View raw message