incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1294783 - /incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
Date Tue, 28 Feb 2012 18:59:08 GMT
Author: vines
Date: Tue Feb 28 18:59:08 2012
New Revision: 1294783

URL: http://svn.apache.org/viewvc?rev=1294783&view=rev
Log:
ACCUMULO-426 - adjusting it to only move the !METADATA tablets with a 1/4 chance.

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java?rev=1294783&r1=1294782&r2=1294783&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
Tue Feb 28 18:59:08 2012
@@ -88,6 +88,7 @@ public class ChaoticLoadBalancer extends
     if (!migrations.isEmpty())
       return 100;
 
+    boolean moveMetadata = r.nextInt(4) == 0;
     long totalTablets = 0;
     for (Entry<TServerInstance,TabletServerStatus> e : current.entrySet()) {
       long tabletCount = 0;
@@ -106,6 +107,8 @@ public class ChaoticLoadBalancer extends
     {
       for (String table : e.getValue().getTableMap().keySet())
       {
+        if (!moveMetadata && "!METADATA".equals(table))
+          continue;
         try {
           for (TabletStats ts : getOnlineTabletsForTable(e.getKey(), table)) {
             KeyExtent ke = new KeyExtent(ts.extent);



Mime
View raw message