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 2014/07/11 23:16:46 UTC
[2/2] git commit: ACCUMULO-2978 double-check to make sure all the
tablets are online
ACCUMULO-2978 double-check to make sure all the tablets are online
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/268c8bc3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/268c8bc3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/268c8bc3
Branch: refs/heads/master
Commit: 268c8bc33eb607e7e339147b7c5c216a12b5542e
Parents: ab03780
Author: Eric C. Newton <er...@gmail.com>
Authored: Wed Jul 9 14:08:33 2014 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Fri Jul 11 16:54:24 2014 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/test/BalanceFasterIT.java | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/268c8bc3/test/src/test/java/org/apache/accumulo/test/BalanceFasterIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/BalanceFasterIT.java b/test/src/test/java/org/apache/accumulo/test/BalanceFasterIT.java
index 74db66e..d4de5e7 100644
--- a/test/src/test/java/org/apache/accumulo/test/BalanceFasterIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/BalanceFasterIT.java
@@ -65,11 +65,19 @@ public class BalanceFasterIT extends ConfigurableMacIT {
s.fetchColumnFamily(MetadataSchema.TabletsSection.CurrentLocationColumnFamily.NAME);
s.setRange(MetadataSchema.TabletsSection.getRange());
Map<String, Integer> counts = new HashMap<String, Integer>();
- for (Entry<Key,Value> kv : s) {
- String host = kv.getValue().toString();
- if (!counts.containsKey(host))
- counts.put(host, 0);
- counts.put(host, counts.get(host) + 1);
+ while (true) {
+ int total = 0;
+ counts.clear();
+ for (Entry<Key,Value> kv : s) {
+ String host = kv.getValue().toString();
+ if (!counts.containsKey(host))
+ counts.put(host, 0);
+ counts.put(host, counts.get(host) + 1);
+ total++;
+ }
+ // are enough tablets online?
+ if (total > 1000)
+ break;
}
// should be on all three servers
assertTrue(counts.size() == 3);