You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/11/05 21:18:31 UTC
[2/2] git commit: ACCUMULO-1761 added test for disk usage over
multiple volumes
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/d17c90b3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d17c90b3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d17c90b3
Branch: refs/heads/master
Commit: d17c90b348e96fc61a75b73c70a189ac36e90b7b
Parents: 6239604
Author: Eric Newton <er...@gmail.com>
Authored: Tue Nov 5 15:18:26 2013 -0500
Committer: Eric Newton <er...@gmail.com>
Committed: Tue Nov 5 15:18:45 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/d17c90b3/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);
}
}