accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] git commit: ACCUMULO-1761 added test for disk usage over multiple volumes
Date Tue, 05 Nov 2013 20:18:30 GMT
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 5d7f6a940 -> 82896bd0d
  refs/heads/master 6239604c1 -> d17c90b34


ACCUMULO-1761 added test for disk usage over multiple volumes


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 82896bd0d33307e781c48aee45d6fa9f1708693a
Parents: 5d7f6a9
Author: Eric Newton <eric.newton@gmail.com>
Authored: Tue Nov 5 15:18:26 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Tue Nov 5 15:18:26 2013 -0500

----------------------------------------------------------------------
 test/src/test/java/org/apache/accumulo/test/VolumeIT.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/82896bd0/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
index 53a7575..8234079 100644
--- a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
@@ -21,6 +21,8 @@ import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -29,6 +31,7 @@ import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.admin.DiskUsage;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -110,6 +113,11 @@ public class VolumeIT extends ConfigurableMacIT {
       fileCount++;
     }
     assertEquals(4, fileCount);
+    List<DiskUsage> diskUsage = connector.tableOperations().getDiskUsage(Collections.singleton(tableName));
+    assertEquals(1, diskUsage.size());
+    long usage = diskUsage.get(0).getUsage().longValue();
+    System.out.println("usage " + usage);
+    assertTrue(usage > 700 && usage < 800);
   }
 
 }


Mime
View raw message