accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [26/46] - in /incubator/accumulo: branches/1.3/contrib/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/ branches/1.3/src/core/src/main/...
Date Thu, 27 Oct 2011 15:25:17 GMT
Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Thu Oct 27 15:24:51 2011
@@ -199,16 +199,15 @@ public class Master implements Listener,
   static final boolean X = true;
   static final boolean _ = false;
   static final boolean transitionOK[][] = {
-    //                          INITIAL HAVE_LOCK WAIT SAFE_MODE NORMAL UNLOAD_META UNLOAD_ROOT STOP
-    /* INITIAL                  */{X,         X,   _,      _,      _,        _,          _,      X},
-    /* HAVE_LOCK                */{_,         X,   X,      _,      _,        _,          _,      X},
-    /* WAIT_FOR_TSERVERS        */{_,         _,   X,      X,      _,        _,          _,      X},
-    /* SAFE_MODE                */{_,         _,   _,      X,      X,        X,          _,      X},
-    /* NORMAL                   */{_,         _,   _,      X,      X,        X,          _,      X},
-    /* UNLOAD_METADATA_TABLETS  */{_,         _,   _,      X,      X,        X,          X,      X},
-    /* UNLOAD_ROOT_TABLET       */{_,         _,   _,      _,      _,        _,          X,      X},
-    /* STOP                     */{_,         _,   _,      _,      _,        _,          _,      X},};
-
+      // INITIAL HAVE_LOCK WAIT SAFE_MODE NORMAL UNLOAD_META UNLOAD_ROOT STOP
+      /* INITIAL */{X, X, _, _, _, _, _, X},
+      /* HAVE_LOCK */{_, X, X, _, _, _, _, X},
+      /* WAIT_FOR_TSERVERS */{_, _, X, X, _, _, _, X},
+      /* SAFE_MODE */{_, _, _, X, X, X, _, X},
+      /* NORMAL */{_, _, _, X, X, X, _, X},
+      /* UNLOAD_METADATA_TABLETS */{_, _, _, X, X, X, X, X},
+      /* UNLOAD_ROOT_TABLET */{_, _, _, _, _, _, X, X},
+      /* STOP */{_, _, _, _, _, _, _, X},};
   
   synchronized private void setMasterState(MasterState newState) {
     if (!transitionOK[state.ordinal()][newState.ordinal()]) {
@@ -219,7 +218,8 @@ public class Master implements Listener,
     state = newState;
     nextEvent.somethingInterestingHappened("State changed from %s to %s", oldState, newState);
     // This frees the main thread and will cause the master to exit
-    if (newState == MasterState.STOP) clientService.stop();
+    if (newState == MasterState.STOP)
+      clientService.stop();
     
     if (oldState != newState && newState == MasterState.SAFE_MODE) {
       upgradeSettings();
@@ -239,7 +239,8 @@ public class Master implements Listener,
             fail = true;
           }
         }
-        if (fail) throw new Exception("Upgrade requires a clean shutdown");
+        if (fail)
+          throw new Exception("Upgrade requires a clean shutdown");
         
         // perform 1.2 -> 1.3 settings
         zset(Property.TABLE_LOCALITY_GROUP_PREFIX.getKey() + "tablet",
@@ -349,7 +350,8 @@ public class Master implements Listener,
   }
   
   private void verify(AuthInfo credentials, boolean match) throws ThriftSecurityException {
-    if (!match) throw new AccumuloSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED).asThriftException();
+    if (!match)
+      throw new AccumuloSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED).asThriftException();
     
   }
   
@@ -370,8 +372,8 @@ public class Master implements Listener,
   }
   
   private void checkTableDoesNotExist(String tableName, TableOperation operation) throws ThriftTableOperationException {
-    if (Tables.getNameToIdMap(instance).containsKey(tableName)) throw new ThriftTableOperationException(null, tableName, operation,
-        TableOperationExceptionType.EXISTS, null);
+    if (Tables.getNameToIdMap(instance).containsKey(tableName))
+      throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.EXISTS, null);
   }
   
   private void waitAround() {
@@ -592,7 +594,8 @@ public class Master implements Listener,
       for (TServerInstance instance : tserverSet.getCurrentServers()) {
         try {
           final TServerConnection server = tserverSet.getConnection(instance);
-          if (server != null) server.flush(masterLock, tableId);
+          if (server != null)
+            server.flush(masterLock, tableId);
         } catch (TException ex) {
           log.error(ex.toString());
         }
@@ -869,9 +872,11 @@ public class Master implements Listener,
       while (true) {
         boolean waitLonger = false;
         for (TabletGroupWatcher watcher : watchers) {
-          if (watcher.stats.lastScanFinished() < now) waitLonger = true;
+          if (watcher.stats.lastScanFinished() < now)
+            waitLonger = true;
         }
-        if (!waitLonger) break;
+        if (!waitLonger)
+          break;
         waitAround();
       }
       // Now the watchers won't assigning tablets for the deleted table
@@ -893,7 +898,8 @@ public class Master implements Listener,
         } finally {
           metaDataTableScanner.close();
         }
-        if (!done) waitAround();
+        if (!done)
+          waitAround();
       }
     }
     
@@ -966,10 +972,12 @@ public class Master implements Listener,
       case NORMAL:
         return TabletGoalState.HOSTED;
       case SAFE_MODE:
-        if (extent.getTableId().equals(METADATA_TABLE_ID)) return TabletGoalState.HOSTED;
+        if (extent.getTableId().equals(METADATA_TABLE_ID))
+          return TabletGoalState.HOSTED;
         return TabletGoalState.UNASSIGNED;
       case UNLOAD_METADATA_TABLETS:
-        if (extent.equals(Constants.ROOT_TABLET_EXTENT)) return TabletGoalState.HOSTED;
+        if (extent.equals(Constants.ROOT_TABLET_EXTENT))
+          return TabletGoalState.HOSTED;
         return TabletGoalState.UNASSIGNED;
       case UNLOAD_ROOT_TABLET:
         return TabletGoalState.UNASSIGNED;
@@ -982,7 +990,8 @@ public class Master implements Listener,
   
   TabletGoalState getTableGoalState(KeyExtent extent) {
     TableState tableState = TableManager.getInstance().getTableState(extent.getTableId().toString());
-    if (tableState == null) return TabletGoalState.DELETED;
+    if (tableState == null)
+      return TabletGoalState.DELETED;
     switch (tableState) {
       case DELETING:
         return TabletGoalState.DELETED;
@@ -1103,7 +1112,8 @@ public class Master implements Listener,
               }
               switch (state) {
                 case HOSTED:
-                  if (server.equals(migrations.get(tls.extent))) migrations.remove(tls.extent);
+                  if (server.equals(migrations.get(tls.extent)))
+                    migrations.remove(tls.extent);
                   break;
                 case ASSIGNED_TO_DEAD_SERVER:
                   assignedToDeadServers.add(tls);
@@ -1184,7 +1194,8 @@ public class Master implements Listener,
             log.warn(store.name() + " load balancer assigning tablet that was not nominated for assignment " + assignment.getKey());
           }
         }
-        if (!unassigned.isEmpty() && assignedOut.isEmpty()) log.warn("Load balancer failed to assign any tablets");
+        if (!unassigned.isEmpty() && assignedOut.isEmpty())
+          log.warn("Load balancer failed to assign any tablets");
       }
       
       if (assignments.size() > 0) {
@@ -1256,7 +1267,8 @@ public class Master implements Listener,
             case NORMAL:
               switch (getMasterState()) {
                 case SAFE_MODE:
-                  if (cycledOnce()) setMasterState(MasterState.NORMAL);
+                  if (cycledOnce())
+                    setMasterState(MasterState.NORMAL);
                 case NORMAL:
                   break;
               }
@@ -1276,7 +1288,8 @@ public class Master implements Listener,
                 case SAFE_MODE:
                   count = nonMetaDataTabletsAssignedOrHosted();
                   log.debug(String.format("There are %d non-metadata tablets assigned or hosted", count));
-                  if (count == 0) setMasterState(MasterState.UNLOAD_METADATA_TABLETS);
+                  if (count == 0)
+                    setMasterState(MasterState.UNLOAD_METADATA_TABLETS);
                   break;
                 case UNLOAD_METADATA_TABLETS:
                   count = assignedOrHosted(METADATA_TABLE_ID);
@@ -1284,11 +1297,13 @@ public class Master implements Listener,
                   // Assumes last tablet hosted is the root tablet;
                   // it's possible
                   // that's not the case (root tablet is offline?)
-                  if (count == 1) setMasterState(MasterState.UNLOAD_ROOT_TABLET);
+                  if (count == 1)
+                    setMasterState(MasterState.UNLOAD_ROOT_TABLET);
                   break;
                 case UNLOAD_ROOT_TABLET:
                   count = assignedOrHosted(METADATA_TABLE_ID);
-                  if (count > 0) log.debug(String.format("The root tablet is still assigned or hosted"));
+                  if (count > 0)
+                    log.debug(String.format("The root tablet is still assigned or hosted"));
                   Set<TServerInstance> currentServers = tserverSet.getCurrentServers();
                   if (count == 0) {
                     log.debug("stopping " + currentServers.size() + " tablet servers");
@@ -1301,7 +1316,8 @@ public class Master implements Listener,
                         log.error("Unable to halt server " + server + ": " + e);
                       }
                     }
-                    if (currentServers.size() == 0) setMasterState(MasterState.STOP);
+                    if (currentServers.size() == 0)
+                      setMasterState(MasterState.STOP);
                   }
                   break;
               }
@@ -1345,7 +1361,8 @@ public class Master implements Listener,
         try {
           log.debug("Telling " + tserver.getInstance() + " to use loggers " + entry.getValue());
           TServerConnection connection = tserverSet.getConnection(tserver.getInstance());
-          if (connection != null) connection.useLoggers(new HashSet<String>(entry.getValue()));
+          if (connection != null)
+            connection.useLoggers(new HashSet<String>(entry.getValue()));
         } catch (Exception ex) {
           log.warn("Unable to talk to " + tserver.getInstance(), ex);
         }
@@ -1376,7 +1393,8 @@ public class Master implements Listener,
     long start = System.currentTimeMillis();
     SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<TServerInstance,TabletServerStatus>();
     for (TServerInstance server : tserverSet.getCurrentServers()) {
-      if (serversToShutdown.contains(server)) continue;
+      if (serversToShutdown.contains(server))
+        continue;
       try {
         TabletServerStatus status = tserverSet.getConnection(server).getTableMap();
         result.put(server, status);
@@ -1579,7 +1597,8 @@ public class Master implements Listener,
   public Set<String> onlineTables() {
     Set<String> result = new HashSet<String>();
     if (getMasterState() != MasterState.NORMAL) {
-      if (getMasterState() != MasterState.UNLOAD_METADATA_TABLETS) result.add(Constants.METADATA_TABLE_ID);
+      if (getMasterState() != MasterState.UNLOAD_METADATA_TABLETS)
+        result.add(Constants.METADATA_TABLE_ID);
       return result;
     }
     TableManager manager = TableManager.getInstance();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/TabletServerLoggers.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/TabletServerLoggers.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/TabletServerLoggers.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/TabletServerLoggers.java Thu Oct 27 15:24:51 2011
@@ -67,7 +67,8 @@ public class TabletServerLoggers impleme
     Map<String,String> current = new HashMap<String,String>();
     for (String child : cache.getChildren(path)) {
       byte[] value = cache.get(path + "/" + child);
-      if (value != null) current.put(child, new String(value));
+      if (value != null)
+        current.put(child, new String(value));
     }
     return current;
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java Thu Oct 27 15:24:51 2011
@@ -51,7 +51,8 @@ public class DefaultLoadBalancer extends
   }
   
   public TServerInstance getAssignment(SortedMap<TServerInstance,TabletServerStatus> locations, KeyExtent extent, TServerInstance last) {
-    if (locations.size() == 0) return null;
+    if (locations.size() == 0)
+      return null;
     
     if (last != null) {
       // Maintain locality
@@ -59,13 +60,15 @@ public class DefaultLoadBalancer extends
       Iterator<TServerInstance> find = locations.tailMap(simple).keySet().iterator();
       if (find.hasNext()) {
         TServerInstance current = find.next();
-        if (current.host().equals(last.host())) return current;
+        if (current.host().equals(last.host()))
+          return current;
       }
     }
     
     // The strategy here is to walk through the locations and hand them back, one at a time
     // Grab an iterator off of the set of options; use a new iterator if it hands back something not in the current list.
-    if (assignments == null || !assignments.hasNext()) assignments = locations.keySet().iterator();
+    if (assignments == null || !assignments.hasNext())
+      assignments = locations.keySet().iterator();
     TServerInstance result = assignments.next();
     if (!locations.containsKey(result)) {
       assignments = null;
@@ -87,7 +90,8 @@ public class DefaultLoadBalancer extends
     
     public int compareTo(ServerCounts obj) {
       int result = count - obj.count;
-      if (result == 0) return server.compareTo(obj.server);
+      if (result == 0)
+        return server.compareTo(obj.server);
       return result;
     }
   }
@@ -110,7 +114,8 @@ public class DefaultLoadBalancer extends
             /**
              * The check below was on entry.getKey(), but that resolves to a tabletserver not a tablename. Believe it should be e.getKey() which is a tablename
              */
-            if (tableToBalance == null || tableToBalance.equals(e.getKey())) serverTotal += e.getValue().onlineTablets;
+            if (tableToBalance == null || tableToBalance.equals(e.getKey()))
+              serverTotal += e.getValue().onlineTablets;
           }
         }
         totals.add(new ServerCounts(serverTotal, entry.getKey(), entry.getValue()));
@@ -151,7 +156,8 @@ public class DefaultLoadBalancer extends
           result.addAll(move(tooMany, tooLittle, needToUnload));
           movedAlready += needToUnload;
         }
-        if (needToUnload > needToLoad) moreBalancingNeeded = true;
+        if (needToUnload > needToLoad)
+          moreBalancingNeeded = true;
       }
       
     } finally {
@@ -176,7 +182,8 @@ public class DefaultLoadBalancer extends
   List<TabletMigration> move(ServerCounts tooMuch, ServerCounts tooLittle, int count) {
     
     List<TabletMigration> result = new ArrayList<TabletMigration>();
-    if (count == 0) return result;
+    if (count == 0)
+      return result;
     
     Map<String,Map<KeyExtent,TabletStats>> onlineTablets = new HashMap<String,Map<KeyExtent,TabletStats>>();
     // Copy counts so we can update them as we propose migrations
@@ -193,7 +200,8 @@ public class DefaultLoadBalancer extends
         String biggestDifferenceTable = null;
         for (Entry<String,Integer> tableEntry : tooMuchMap.entrySet()) {
           String tableID = tableEntry.getKey();
-          if (tooLittleMap.get(tableID) == null) tooLittleMap.put(tableID, 0);
+          if (tooLittleMap.get(tableID) == null)
+            tooLittleMap.put(tableID, 0);
           int diff = tableEntry.getValue() - tooLittleMap.get(tableID);
           if (diff > biggestDifference) {
             biggestDifference = diff;
@@ -223,7 +231,8 @@ public class DefaultLoadBalancer extends
       }
       KeyExtent extent = selectTablet(tooMuch.server, onlineTabletsForTable);
       onlineTabletsForTable.remove(extent);
-      if (extent == null) return result;
+      if (extent == null)
+        return result;
       tooMuchMap.put(table, tooMuchMap.get(table) - 1);
       /**
        * If a table grows from 1 tablet then tooLittleMap.get(table) can return a null, since there is only one tabletserver that holds all of the tablets. Here
@@ -252,7 +261,8 @@ public class DefaultLoadBalancer extends
   }
   
   static KeyExtent selectTablet(TServerInstance tserver, Map<KeyExtent,TabletStats> extents) {
-    if (extents.size() == 0) return null;
+    if (extents.size() == 0)
+      return null;
     KeyExtent mostRecentlySplit = null;
     long splitTime = 0;
     for (Entry<KeyExtent,TabletStats> entry : extents.entrySet())
@@ -292,7 +302,8 @@ public class DefaultLoadBalancer extends
     if (current.size() > 0) {
       // Don't migrate if we have migrations in progress
       if (migrations.size() == 0) {
-        if (getMigrations(current, migrationsOut)) return 1 * 1000;
+        if (getMigrations(current, migrationsOut))
+          return 1 * 1000;
       }
     }
     return 5 * 1000;

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancer.java Thu Oct 27 15:24:51 2011
@@ -42,11 +42,14 @@ public class SimpleLoggerBalancer implem
   
   @Override
   public void balance(List<LoggerUser> current, List<String> loggers, Map<LoggerUser,List<String>> assignmentsOut, int loggersPerServer) {
-    if (System.currentTimeMillis() - lastBalance < minimumTimeBetweenRebalances) return;
+    if (System.currentTimeMillis() - lastBalance < minimumTimeBetweenRebalances)
+      return;
     // any loggers?
-    if (loggers.size() <= 0) return;
+    if (loggers.size() <= 0)
+      return;
     // more than one user of loggers?
-    if (current.size() < 2) return;
+    if (current.size() < 2)
+      return;
     
     // compute the "load" on loggers, create a list of the users for each logger
     Map<String,List<LoggerUser>> counts = new HashMap<String,List<LoggerUser>>();
@@ -57,7 +60,8 @@ public class SimpleLoggerBalancer implem
     for (LoggerUser user : current) {
       for (String logger : user.getLoggers()) {
         uses++;
-        if (!counts.containsKey(logger)) counts.put(logger, new ArrayList<LoggerUser>());
+        if (!counts.containsKey(logger))
+          counts.put(logger, new ArrayList<LoggerUser>());
         counts.get(logger).add(user);
       }
     }
@@ -73,26 +77,32 @@ public class SimpleLoggerBalancer implem
     // already balanced?
     // balanced means that no logger is being used by more than ceiling(average(number servers per logger))
     final int average = (int) Math.ceil((double) uses / loggers.size());
-    if (byCount.get(0).getValue().size() <= average) return;
+    if (byCount.get(0).getValue().size() <= average)
+      return;
     
     // Rebalance
     // move a server on high-use loggers to low-use loggers if it is not currently using that logger
     for (Entry<String,List<LoggerUser>> entry : byCount) {
       // String logger = entry.getKey();
       List<LoggerUser> servers = entry.getValue();
-      if (servers.size() <= average) return;
+      if (servers.size() <= average)
+        return;
       // Walk backwards from the low-use loggers, looking for a logger that is:
       // 1) still low-use and 2) not used by this server
       for (int i = byCount.size() - 1; i >= 0; i--) {
         String lowCountLogger = byCount.get(i).getKey();
         List<LoggerUser> lowCountUsers = byCount.get(i).getValue();
-        if (lowCountUsers.size() >= average) continue;
+        if (lowCountUsers.size() >= average)
+          continue;
         Set<LoggerUser> notUsingLowCountLogger = (Set<LoggerUser>) new HashSet<LoggerUser>(servers);
         notUsingLowCountLogger.removeAll(lowCountUsers);
-        if (notUsingLowCountLogger.isEmpty()) continue;
+        if (notUsingLowCountLogger.isEmpty())
+          continue;
         for (LoggerUser user : notUsingLowCountLogger) {
-          if (lowCountUsers.size() >= average) break;
-          if (!assignmentsOut.containsKey(user)) assignmentsOut.put(user, new ArrayList<String>());
+          if (lowCountUsers.size() >= average)
+            break;
+          if (!assignmentsOut.containsKey(user))
+            assignmentsOut.put(user, new ArrayList<String>());
           if (assignmentsOut.get(user).size() < loggersPerServer) {
             assignmentsOut.get(user).add(lowCountLogger);
             lowCountUsers.add(user);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java Thu Oct 27 15:24:51 2011
@@ -56,7 +56,8 @@ public class TableLoadBalancer extends T
     
     String clazzName = AccumuloConfiguration.getTableConfiguration(HdfsZooInstance.getInstance().getInstanceID(), table).get(Property.TABLE_LOAD_BALANCER);
     
-    if (clazzName == null) clazzName = DefaultLoadBalancer.class.getName();
+    if (clazzName == null)
+      clazzName = DefaultLoadBalancer.class.getName();
     if (balancer != null) {
       if (clazzName.equals(balancer.getClass().getName()) == false) {
         // the balancer class for this table does not match the class specified in the configuration
@@ -112,14 +113,15 @@ public class TableLoadBalancer extends T
   private TableOperations tops = null;
   
   private TableOperations getTableOperations() {
-    if (tops == null) try {
-      tops = HdfsZooInstance.getInstance().getConnector(SecurityConstants.systemCredentials.user, SecurityConstants.systemCredentials.password)
-          .tableOperations();
-    } catch (AccumuloException e) {
-      log.error("Unable to access table operations from within table balancer", e);
-    } catch (AccumuloSecurityException e) {
-      log.error("Unable to access table operations from within table balancer", e);
-    }
+    if (tops == null)
+      try {
+        tops = HdfsZooInstance.getInstance().getConnector(SecurityConstants.systemCredentials.user, SecurityConstants.systemCredentials.password)
+            .tableOperations();
+      } catch (AccumuloException e) {
+        log.error("Unable to access table operations from within table balancer", e);
+      } catch (AccumuloSecurityException e) {
+        log.error("Unable to access table operations from within table balancer", e);
+      }
     return tops;
   }
   
@@ -128,11 +130,13 @@ public class TableLoadBalancer extends T
     long minBalanceTime = 5 * 1000;
     // Iterate over the tables and balance each of them
     TableOperations t = getTableOperations();
-    if (t == null) return minBalanceTime;
+    if (t == null)
+      return minBalanceTime;
     for (String s : t.tableIdMap().values()) {
       ArrayList<TabletMigration> newMigrations = new ArrayList<TabletMigration>();
       long tableBalanceTime = getBalancerForTable(s).balance(current, migrations, newMigrations);
-      if (tableBalanceTime < minBalanceTime) minBalanceTime = tableBalanceTime;
+      if (tableBalanceTime < minBalanceTime)
+        minBalanceTime = tableBalanceTime;
       migrationsOut.addAll(newMigrations);
     }
     return minBalanceTime;

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java Thu Oct 27 15:24:51 2011
@@ -69,7 +69,8 @@ public class MetaDataTableScanner implem
           servers.add(server.toString());
         mdScanner.setScanIteratorOption("tabletChange", "servers", StringUtil.join(servers, ","));
       }
-      if (onlineTables != null) mdScanner.setScanIteratorOption("tabletChange", "tables", StringUtil.join(onlineTables, ","));
+      if (onlineTables != null)
+        mdScanner.setScanIteratorOption("tabletChange", "tables", StringUtil.join(onlineTables, ","));
       iter = mdScanner.iterator();
     } catch (Exception ex) {
       throw new RuntimeException(ex);
@@ -92,7 +93,8 @@ public class MetaDataTableScanner implem
   @Override
   public boolean hasNext() {
     boolean result = iter.hasNext();
-    if (!result) mdScanner.close();
+    if (!result)
+      mdScanner.close();
     return result;
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TableStats.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TableStats.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TableStats.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TableStats.java Thu Oct 27 15:24:51 2011
@@ -56,12 +56,14 @@ public class TableStats {
   
   public synchronized TableCounts getLast(Text tableId) {
     TableCounts result = last.get(tableId);
-    if (result == null) return new TableCounts();
+    if (result == null)
+      return new TableCounts();
     return result;
   }
   
   public synchronized long getScanTime() {
-    if (endScan <= startScan) return System.currentTimeMillis() - startScan;
+    if (endScan <= startScan)
+      return System.currentTimeMillis() - startScan;
     return endScan - startScan;
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletLocationState.java Thu Oct 27 15:24:51 2011
@@ -42,7 +42,8 @@ public class TabletLocationState {
     this.future = future;
     this.current = current;
     this.last = last;
-    if (walogs == null) walogs = Collections.emptyList();
+    if (walogs == null)
+      walogs = Collections.emptyList();
     this.walogs = walogs;
     if (current != null && future != null) {
       log.error(extent + " is both assigned and hosted, which should never happen: " + this);
@@ -73,13 +74,15 @@ public class TabletLocationState {
   
   public TabletState getState(Set<TServerInstance> liveServers) {
     TServerInstance server = getServer();
-    if (server == null) return TabletState.UNASSIGNED;
+    if (server == null)
+      return TabletState.UNASSIGNED;
     if (server.equals(current) || server.equals(future)) {
-      if (liveServers.contains(server)) if (server.equals(future)) {
-        return TabletState.ASSIGNED;
-      } else {
-        return TabletState.HOSTED;
-      }
+      if (liveServers.contains(server))
+        if (server.equals(future)) {
+          return TabletState.ASSIGNED;
+        } else {
+          return TabletState.HOSTED;
+        }
       else {
         return TabletState.ASSIGNED_TO_DEAD_SERVER;
       }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletServerState.java Thu Oct 27 15:24:51 2011
@@ -51,7 +51,8 @@ public enum TabletServerState {
     badStates = new HashSet<TabletServerState>();
     for (TabletServerState state : TabletServerState.values()) {
       mapping.put(state.id, state);
-      if (state.id > 99) badStates.add(state);
+      if (state.id > 99)
+        badStates.add(state);
     }
   }
   
@@ -64,7 +65,8 @@ public enum TabletServerState {
   }
   
   public static TabletServerState getStateById(byte id) {
-    if (mapping.containsKey(id)) return mapping.get(id);
+    if (mapping.containsKey(id))
+      return mapping.get(id);
     throw new IndexOutOfBoundsException("No such state");
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/TabletStateChangeIterator.java Thu Oct 27 15:24:51 2011
@@ -44,7 +44,8 @@ public class TabletStateChangeIterator e
   }
   
   private Set<String> parseTables(String tables) {
-    if (tables == null) return null;
+    if (tables == null)
+      return null;
     Set<String> result = new HashSet<String>();
     for (String table : tables.split(","))
       result.add(table);
@@ -52,14 +53,16 @@ public class TabletStateChangeIterator e
   }
   
   private Set<TServerInstance> parseServers(String servers) {
-    if (servers == null) return null;
+    if (servers == null)
+      return null;
     // parse "host:port[INSTANCE]"
     Set<TServerInstance> result = new HashSet<TServerInstance>();
     for (String part : servers.split(",")) {
       String parts[] = part.split("\\[", 2);
       String hostport = parts[0];
       String instance = parts[1];
-      if (instance != null && instance.endsWith("]")) instance = instance.substring(instance.length() - 1);
+      if (instance != null && instance.endsWith("]"))
+        instance = instance.substring(instance.length() - 1);
       result.add(new TServerInstance(AddressUtil.parseAddress(hostport, Property.TSERV_CLIENTPORT), instance));
     }
     return result;
@@ -71,7 +74,8 @@ public class TabletStateChangeIterator e
       Key k = getSource().getTopKey();
       Value v = getSource().getTopValue();
       
-      if (onlineTables == null || current == null) return;
+      if (onlineTables == null || current == null)
+        return;
       SortedMap<Key,Value> decodedRow = WholeRowIterator.decodeRow(k, v);
       
       TabletLocationState tls = MetaDataTableScanner.createTabletLocationState(decodedRow);
@@ -81,11 +85,13 @@ public class TabletStateChangeIterator e
         case ASSIGNED:
           return;
         case HOSTED:
-          if (!shouldBeOnline) return;
+          if (!shouldBeOnline)
+            return;
         case ASSIGNED_TO_DEAD_SERVER:
           /* fall-through intentional */
         case UNASSIGNED:
-          if (shouldBeOnline) return;
+          if (shouldBeOnline)
+            return;
       }
       getSource().next();
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java Thu Oct 27 15:24:51 2011
@@ -36,7 +36,8 @@ public class ZooStore implements Distrib
   
   public ZooStore(String basePath) throws IOException {
     this.basePath = basePath;
-    if (basePath.endsWith("/")) basePath.substring(0, basePath.length() - 1);
+    if (basePath.endsWith("/"))
+      basePath.substring(0, basePath.length() - 1);
   }
   
   public ZooStore() throws IOException {
@@ -82,7 +83,8 @@ public class ZooStore implements Distrib
     try {
       log.debug("Removing " + path);
       path = relative(path);
-      if (ZooUtil.exists(path)) ZooUtil.recursiveDelete(path, NodeMissingPolicy.SKIP);
+      if (ZooUtil.exists(path))
+        ZooUtil.recursiveDelete(path, NodeMissingPolicy.SKIP);
       cache.clear();
     } catch (Exception ex) {
       throw new DistributedStoreException(ex);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/ZooTabletStateStore.java Thu Oct 27 15:24:51 2011
@@ -68,9 +68,11 @@ public class ZooTabletStateStore extends
           TServerInstance futureSession = null;
           TServerInstance lastSession = null;
           
-          if (future != null) futureSession = parse(future);
+          if (future != null)
+            futureSession = parse(future);
           
-          if (last != null) lastSession = parse(last);
+          if (last != null)
+            lastSession = parse(last);
           
           if (current != null) {
             currentSession = parse(current);
@@ -115,18 +117,22 @@ public class ZooTabletStateStore extends
   
   @Override
   public void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException {
-    if (assignments.size() != 1) throw new IllegalArgumentException("There is only one root tablet");
+    if (assignments.size() != 1)
+      throw new IllegalArgumentException("There is only one root tablet");
     Assignment assignment = assignments.iterator().next();
-    if (assignment.tablet.compareTo(Constants.ROOT_TABLET_EXTENT) != 0) throw new IllegalArgumentException("You can only store the root tablet location");
+    if (assignment.tablet.compareTo(Constants.ROOT_TABLET_EXTENT) != 0)
+      throw new IllegalArgumentException("You can only store the root tablet location");
     String value = AddressUtil.toString(assignment.server.getLocation()) + "|" + assignment.server.getSession();
     store.put(Constants.ZROOT_TABLET_FUTURE_LOCATION, value.getBytes());
   }
   
   @Override
   public void setLocations(Collection<Assignment> assignments) throws DistributedStoreException {
-    if (assignments.size() != 1) throw new IllegalArgumentException("There is only one root tablet");
+    if (assignments.size() != 1)
+      throw new IllegalArgumentException("There is only one root tablet");
     Assignment assignment = assignments.iterator().next();
-    if (assignment.tablet.compareTo(Constants.ROOT_TABLET_EXTENT) != 0) throw new IllegalArgumentException("You can only store the root tablet location");
+    if (assignment.tablet.compareTo(Constants.ROOT_TABLET_EXTENT) != 0)
+      throw new IllegalArgumentException("You can only store the root tablet location");
     String value = AddressUtil.toString(assignment.server.getLocation()) + "|" + assignment.server.getSession();
     store.put(Constants.ZROOT_TABLET_LOCATION, value.getBytes());
     store.put(Constants.ZROOT_TABLET_LAST_LOCATION, value.getBytes());
@@ -136,9 +142,11 @@ public class ZooTabletStateStore extends
   
   @Override
   public void unassign(Collection<TabletLocationState> tablets) throws DistributedStoreException {
-    if (tablets.size() != 1) throw new IllegalArgumentException("There is only one root tablet");
+    if (tablets.size() != 1)
+      throw new IllegalArgumentException("There is only one root tablet");
     TabletLocationState tls = tablets.iterator().next();
-    if (tls.extent.compareTo(Constants.ROOT_TABLET_EXTENT) != 0) throw new IllegalArgumentException("You can only store the root tablet location");
+    if (tls.extent.compareTo(Constants.ROOT_TABLET_EXTENT) != 0)
+      throw new IllegalArgumentException("You can only store the root tablet location");
     store.remove(Constants.ZROOT_TABLET_LOCATION);
     store.remove(Constants.ZROOT_TABLET_FUTURE_LOCATION);
     log.debug("unassign root tablet location");

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java Thu Oct 27 15:24:51 2011
@@ -57,7 +57,8 @@ public class TableManager {
   }
   
   public synchronized static TableManager getInstance() {
-    if (tableManager == null) tableManager = new TableManager();
+    if (tableManager == null)
+      tableManager = new TableManager();
     return tableManager;
   }
   
@@ -90,7 +91,8 @@ public class TableManager {
       
       ZooUtil.putPersistentData(statePath, newState.name().getBytes(), stat.getVersion(), NodeExistsPolicy.OVERWRITE);
     } catch (KeeperException e) {
-      if (e.code().equals(Code.BADVERSION)) throw new IllegalStateException("Cannot transition table " + tableId + " from " + oldState + " to " + newState);
+      if (e.code().equals(Code.BADVERSION))
+        throw new IllegalStateException("Cannot transition table " + tableId + " from " + oldState + " to " + newState);
     } catch (Exception e) {
       log.fatal("Failed to transition table to state " + newState);
       throw new RuntimeException(e);
@@ -100,7 +102,8 @@ public class TableManager {
   private void updateTableStateCache() {
     synchronized (tableStateCache) {
       for (String tableId : zooStateCache.getChildren(ZooUtil.getRoot(instance) + Constants.ZTABLES))
-        if (zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE) != null) updateTableStateCache(tableId);
+        if (zooStateCache.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE) != null)
+          updateTableStateCache(tableId);
     }
   }
   
@@ -150,7 +153,8 @@ public class TableManager {
   private class TableStateWatcher implements Watcher {
     @Override
     public void process(WatchedEvent event) {
-      if (log.isTraceEnabled()) log.trace(event);
+      if (log.isTraceEnabled())
+        log.trace(event);
       
       final String zPath = event.getPath();
       final EventType zType = event.getType();
@@ -162,7 +166,8 @@ public class TableManager {
         String suffix = zPath.substring(tablesPrefix.length() + 1);
         if (suffix.contains("/")) {
           String[] sa = suffix.split("/", 2);
-          if (Constants.ZTABLE_STATE.equals("/" + sa[1])) tableId = sa[0];
+          if (Constants.ZTABLE_STATE.equals("/" + sa[1]))
+            tableId = sa[0];
         }
         if (tableId == null) {
           log.warn("Unknown path in " + event);
@@ -192,12 +197,14 @@ public class TableManager {
           if (zPath != null
               && tableId != null
               && (zPath.equals(tablesPrefix + "/" + tableId + Constants.ZTABLE_STATE) || zPath.equals(tablesPrefix + "/" + tableId + Constants.ZTABLE_CONF) || zPath
-                  .equals(tablesPrefix + "/" + tableId + Constants.ZTABLE_NAME))) tableStateCache.remove(tableId);
+                  .equals(tablesPrefix + "/" + tableId + Constants.ZTABLE_NAME)))
+            tableStateCache.remove(tableId);
           break;
         case None:
           switch (event.getState()) {
             case Expired:
-              if (log.isTraceEnabled()) log.trace("Session expired " + event);
+              if (log.isTraceEnabled())
+                log.trace("Session expired " + event);
               synchronized (observers) {
                 for (TableObserver to : observers)
                   to.sessionExpired();
@@ -205,7 +212,8 @@ public class TableManager {
               break;
             case SyncConnected:
             default:
-              if (log.isTraceEnabled()) log.trace("Ignored " + event);
+              if (log.isTraceEnabled())
+                log.trace("Ignored " + event);
           }
           break;
         default:

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java Thu Oct 27 15:24:51 2011
@@ -61,17 +61,20 @@ public abstract class AbstractMetricsImp
     }
     
     public void addAvg(long a) {
-      if (a < 0) return;
+      if (a < 0)
+        return;
       avg = (long) ((avg * .8) + (a * .2));
     }
     
     public void addMin(long a) {
-      if (a < 0) return;
+      if (a < 0)
+        return;
       min = Math.min(min, a);
     }
     
     public void addMax(long a) {
-      if (a < 0) return;
+      if (a < 0)
+        return;
       max = Math.max(max, a);
     }
     
@@ -117,7 +120,8 @@ public abstract class AbstractMetricsImp
   public void register(StandardMBean mbean) throws Exception {
     // Register this object with the MBeanServer
     MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-    if (null == getObjectName()) throw new IllegalArgumentException("MBean object name must be set.");
+    if (null == getObjectName())
+      throw new IllegalArgumentException("MBean object name must be set.");
     mbs.registerMBean(mbean, getObjectName());
     
     setupLogging();
@@ -131,7 +135,8 @@ public abstract class AbstractMetricsImp
   public void register() throws Exception {
     // Register this object with the MBeanServer
     MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-    if (null == getObjectName()) throw new IllegalArgumentException("MBean object name must be set.");
+    if (null == getObjectName())
+      throw new IllegalArgumentException("MBean object name must be set.");
     mbs.registerMBean(this, getObjectName());
     
     setupLogging();
@@ -162,14 +167,16 @@ public abstract class AbstractMetricsImp
   }
   
   private void setupLogging() throws IOException {
-    if (null == config.getMetricsConfiguration()) return;
+    if (null == config.getMetricsConfiguration())
+      return;
     // If we are already logging, then return
     if (!currentlyLogging && config.getMetricsConfiguration().getBoolean(metricsPrefix + ".logging", false)) {
       // Check to see if directory exists, else make it
       String mDir = config.getMetricsConfiguration().getString("logging.dir");
       if (null != mDir) {
         File dir = new File(mDir);
-        if (!dir.isDirectory()) dir.mkdir();
+        if (!dir.isDirectory())
+          dir.mkdir();
         logDir = dir;
         // Create new log file
         startNewLog();
@@ -195,7 +202,8 @@ public abstract class AbstractMetricsImp
   }
   
   private void writeToLog(String name) throws IOException {
-    if (null == logWriter) return;
+    if (null == logWriter)
+      return;
     // Increment the date if we have to
     Date now = new Date();
     if (!DateUtils.isSameDay(today, now)) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java Thu Oct 27 15:24:51 2011
@@ -93,7 +93,8 @@ public class MetricsConfiguration {
    */
   private class MetricsConfigListener implements ConfigurationListener {
     public void configurationChanged(ConfigurationEvent event) {
-      if (event.getType() == AbstractFileConfiguration.EVENT_RELOAD) needsReloading = true;
+      if (event.getType() == AbstractFileConfiguration.EVENT_RELOAD)
+        needsReloading = true;
     }
   }
   
@@ -106,12 +107,14 @@ public class MetricsConfiguration {
   }
   
   public Configuration getEnvironmentConfiguration() {
-    if (null == envConfig) envConfig = new EnvironmentConfiguration();
+    if (null == envConfig)
+      envConfig = new EnvironmentConfiguration();
     return envConfig;
   }
   
   public Configuration getSystemConfiguration() {
-    if (null == sysConfig) sysConfig = new SystemConfiguration();
+    if (null == sysConfig)
+      sysConfig = new SystemConfiguration();
     return sysConfig;
   }
   
@@ -127,14 +130,15 @@ public class MetricsConfiguration {
         notFoundCount++;
       }
     }
-    if (null == config || needsReloading) synchronized (lock) {
-      if (needsReloading) {
-        loadConfiguration();
-      } else if (null == config) {
-        loadConfiguration();
+    if (null == config || needsReloading)
+      synchronized (lock) {
+        if (needsReloading) {
+          loadConfiguration();
+        } else if (null == config) {
+          loadConfiguration();
+        }
+        needsReloading = false;
       }
-      needsReloading = false;
-    }
     return config;
   }
   
@@ -145,7 +149,8 @@ public class MetricsConfiguration {
       // Try to load the metrics properties file
       File mFile = new File(ACUHOME, metricsFileName);
       if (mFile.exists()) {
-        if (log.isDebugEnabled()) log.debug("Loading config file: " + mFile.getAbsolutePath());
+        if (log.isDebugEnabled())
+          log.debug("Loading config file: " + mFile.getAbsolutePath());
         try {
           xConfig = new XMLConfiguration(mFile);
           xConfig.append(getEnvironmentConfiguration());
@@ -166,13 +171,15 @@ public class MetricsConfiguration {
           return;
         }
       } else {
-        if (!alreadyWarned) log.warn("Unable to find metrics file: " + mFile.getAbsolutePath());
+        if (!alreadyWarned)
+          log.warn("Unable to find metrics file: " + mFile.getAbsolutePath());
         alreadyWarned = true;
         notFound = true;
         return;
       }
     } else {
-      if (!alreadyWarned) log.warn("ACCUMULO_HOME variable not found in environment. Metrics collection will be disabled.");
+      if (!alreadyWarned)
+        log.warn("ACCUMULO_HOME variable not found in environment. Metrics collection will be disabled.");
       alreadyWarned = true;
       notFound = true;
       return;
@@ -181,7 +188,8 @@ public class MetricsConfiguration {
       config = xConfig.interpolatedConfiguration();
       // set the enabled boolean from the configuration
       enabled = config.getBoolean(enabledName);
-      if (log.isDebugEnabled()) log.debug("Metrics collection enabled=" + enabled);
+      if (log.isDebugEnabled())
+        log.debug("Metrics collection enabled=" + enabled);
     } else {
       enabled = false;
     }
@@ -190,7 +198,8 @@ public class MetricsConfiguration {
   
   public boolean isEnabled() {
     // Force reload if necessary
-    if (null == getMetricsConfiguration()) return false;
+    if (null == getMetricsConfiguration())
+      return false;
     return enabled;
   }
   
@@ -201,7 +210,8 @@ public class MetricsConfiguration {
       tsb.append("\n");
       String k = (String) keys.next();
       Object v = config.getString(k);
-      if (null == v) v = config.getList(k);
+      if (null == v)
+        v = config.getList(k);
       tsb.append(k, v.toString());
     }
     return tsb.toString();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/LogService.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/LogService.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/LogService.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/LogService.java Thu Oct 27 15:24:51 2011
@@ -80,7 +80,8 @@ public class LogService extends org.apac
   static private LogService instance = null;
   
   synchronized public static LogService getInstance() {
-    if (instance == null) return new LogService();
+    if (instance == null)
+      return new LogService();
     return instance;
   }
   
@@ -96,9 +97,11 @@ public class LogService extends org.apac
   @Override
   synchronized protected void append(LoggingEvent ev) {
     Object application = ev.getMDC("application");
-    if (application == null || application.toString().isEmpty()) return;
+    if (application == null || application.toString().isEmpty())
+      return;
     events.add(ev);
-    if (events.size() > keep) events.removeFirst();
+    if (events.size() > keep)
+      events.removeFirst();
   }
   
   @Override

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java Thu Oct 27 15:24:51 2011
@@ -105,7 +105,8 @@ public class Monitor {
     public boolean add(Pair<Long,T> obj) {
       boolean result = super.add(obj);
       
-      if (obj.getFirst() - get(0).getFirst() > maxDelta) remove(0);
+      if (obj.getFirst() - get(0).getFirst() > maxDelta)
+        remove(0);
       
       return result;
     }
@@ -146,8 +147,10 @@ public class Monitor {
   }
   
   public static void add(TableInfo total, TableInfo more) {
-    if (total.minor == null) total.minor = new Compacting();
-    if (total.major == null) total.major = new Compacting();
+    if (total.minor == null)
+      total.minor = new Compacting();
+    if (total.major == null)
+      total.major = new Compacting();
     if (more.minor != null) {
       total.minor.running += more.minor.running;
       total.minor.queued += more.minor.queued;
@@ -233,10 +236,12 @@ public class Monitor {
     
     // only recalc every so often
     long currentTime = System.currentTimeMillis();
-    if (currentTime - lastRecalc < REFRESH_TIME * 1000) return;
+    if (currentTime - lastRecalc < REFRESH_TIME * 1000)
+      return;
     
     synchronized (Monitor.class) {
-      if (fetching) return;
+      if (fetching)
+        return;
       fetching = true;
     }
     
@@ -253,7 +258,8 @@ public class Monitor {
           log.info("Error fetching stats: " + e);
           UtilWaitThread.sleep(1000);
         } finally {
-          if (client != null) MasterClient.close(client);
+          if (client != null)
+            MasterClient.close(client);
         }
       }
       
@@ -300,7 +306,8 @@ public class Monitor {
       
       double totalLoad = 0.;
       for (TabletServerStatus status : mmi.tServerInfo) {
-        if (status != null) totalLoad += status.osLoad;
+        if (status != null)
+          totalLoad += status.osLoad;
       }
       loadOverTime.add(new Pair<Long,Double>(currentTime, totalLoad));
       

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/ZooKeeperStatus.java Thu Oct 27 15:24:51 2011
@@ -74,8 +74,10 @@ public class ZooKeeperStatus implements 
         TTransport transport = null;
         try {
           InetSocketAddress addr;
-          if (parts.length > 1) addr = new InetSocketAddress(parts[0], Integer.parseInt(parts[1]));
-          else addr = new InetSocketAddress(parts[0], 2181);
+          if (parts.length > 1)
+            addr = new InetSocketAddress(parts[0], Integer.parseInt(parts[1]));
+          else
+            addr = new InetSocketAddress(parts[0], 2181);
           
           transport = TTimeoutTransport.create(addr, 10 * 1000l);
           transport.write("stat\n".getBytes(), 0, 5);
@@ -91,8 +93,10 @@ public class ZooKeeperStatus implements 
             // happens at EOF
           }
           for (String line : response.toString().split("\n")) {
-            if (line.startsWith(" ")) clients++;
-            if (line.startsWith("Mode")) mode = line.split(":")[1];
+            if (line.startsWith(" "))
+              clients++;
+            if (line.startsWith("Mode"))
+              mode = line.split(":")[1];
           }
           update.add(new ZooKeeperState(keeper, mode, clients));
         } catch (Exception ex) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java Thu Oct 27 15:24:51 2011
@@ -69,8 +69,10 @@ abstract public class BasicServlet exten
   private static final String DEFAULT_CONTENT_TYPE = "text/html";
   
   public static final Cookie getCookie(HttpServletRequest req, String name) {
-    if (req.getCookies() != null) for (Cookie c : req.getCookies())
-      if (c.getName().equals(name)) return c;
+    if (req.getCookies() != null)
+      for (Cookie c : req.getCookies())
+        if (c.getName().equals(name))
+          return c;
     return null;
   }
   
@@ -92,7 +94,8 @@ abstract public class BasicServlet exten
     // BEGIN HEADER
     sb.append("<head>\n");
     sb.append("<title>").append(getTitle(req)).append(" - Accumulo ").append(Constants.VERSION).append("</title>\n");
-    if ((refresh > 0) && (req.getRequestURI().startsWith("/docs") == false)) sb.append("<meta http-equiv='refresh' content='" + refresh + "' />\n");
+    if ((refresh > 0) && (req.getRequestURI().startsWith("/docs") == false))
+      sb.append("<meta http-equiv='refresh' content='" + refresh + "' />\n");
     sb.append("<meta http-equiv='Content-Type' content='").append(DEFAULT_CONTENT_TYPE).append("' />\n");
     sb.append("<meta http-equiv='Content-Script-Type' content='text/javascript' />\n");
     sb.append("<meta http-equiv='Content-Style-Type' content='text/css' />\n");
@@ -127,10 +130,11 @@ abstract public class BasicServlet exten
     sb.append("<a href='/trace/summary?minutes=10'>Recent&nbsp;Traces</a><br />\n");
     sb.append("<a href='/docs'>Documentation</a><br />\n");
     int numLogs = LogService.getInstance().getEvents().size();
-    if (numLogs > 0) sb.append("<span class='error'><a href='/log'>Log&nbsp;Events&nbsp;<span class='smalltext'>(" + numLogs + ")</a></span></span><br />\n");
+    if (numLogs > 0)
+      sb.append("<span class='error'><a href='/log'>Log&nbsp;Events&nbsp;<span class='smalltext'>(" + numLogs + ")</a></span></span><br />\n");
     int numProblems = Monitor.getProblemSummary().entrySet().size();
-    if (numProblems > 0) sb.append("<span class='error'><a href='/problems'>Table&nbsp;Problems&nbsp;<span class='smalltext'>(" + numProblems
-        + ")</a></span></span><br />\n");
+    if (numProblems > 0)
+      sb.append("<span class='error'><a href='/problems'>Table&nbsp;Problems&nbsp;<span class='smalltext'>(" + numProblems + ")</a></span></span><br />\n");
     sb.append("<hr />\n");
     sb.append("<a href='/xml'>XML</a><hr />\n");
     sb.append("<div class='smalltext'>[<a href='").append("/op?action=refresh&value=").append(refresh < 1 ? "5" : "-1");
@@ -181,7 +185,8 @@ abstract public class BasicServlet exten
   
   public static String currentPage(HttpServletRequest req) {
     String redir = req.getRequestURI();
-    if (req.getQueryString() != null) redir += "?" + req.getQueryString();
+    if (req.getQueryString() != null)
+      redir += "?" + req.getQueryString();
     return encode(redir);
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java Thu Oct 27 15:24:51 2011
@@ -68,9 +68,11 @@ public class DefaultServlet extends Basi
   private void getResource(HttpServletRequest req, HttpServletResponse resp) throws IOException {
     String path = req.getRequestURI();
     
-    if (path.endsWith(".jpg")) resp.setContentType("image/jpeg");
+    if (path.endsWith(".jpg"))
+      resp.setContentType("image/jpeg");
     
-    if (path.endsWith(".html")) resp.setContentType("text/html");
+    if (path.endsWith(".html"))
+      resp.setContentType("text/html");
     
     path = path.substring(1);
     InputStream data = BasicServlet.class.getClassLoader().getResourceAsStream(path);
@@ -85,7 +87,8 @@ public class DefaultServlet extends Basi
   
   private void getDocResource(HttpServletRequest req, final HttpServletResponse resp) throws IOException {
     final String path = req.getRequestURI();
-    if (path.endsWith(".html")) resp.setContentType("text/html");
+    if (path.endsWith(".html"))
+      resp.setContentType("text/html");
     
     // Allow user to only read any file in docs directory
     final String aHome = System.getenv("ACCUMULO_HOME");
@@ -113,17 +116,24 @@ public class DefaultServlet extends Basi
       }
     }, acc);
     
-    if (e != null) throw e;
+    if (e != null)
+      throw e;
   }
   
   @Override
   public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
-    if (req.getRequestURI().startsWith("/web")) getResource(req, resp);
-    else if (req.getRequestURI().equals("/docs") || req.getRequestURI().equals("/docs/apidocs")) super.doGet(req, resp);
-    else if (req.getRequestURI().startsWith("/docs")) getDocResource(req, resp);
-    else if (req.getRequestURI().startsWith("/monitor")) resp.sendRedirect("/master");
-    else if (req.getRequestURI().startsWith("/errors")) resp.sendRedirect("/problems");
-    else super.doGet(req, resp);
+    if (req.getRequestURI().startsWith("/web"))
+      getResource(req, resp);
+    else if (req.getRequestURI().equals("/docs") || req.getRequestURI().equals("/docs/apidocs"))
+      super.doGet(req, resp);
+    else if (req.getRequestURI().startsWith("/docs"))
+      getDocResource(req, resp);
+    else if (req.getRequestURI().startsWith("/monitor"))
+      resp.sendRedirect("/master");
+    else if (req.getRequestURI().startsWith("/errors"))
+      resp.sendRedirect("/problems");
+    else
+      super.doGet(req, resp);
   }
   
   public static final int GRAPH_WIDTH = 450;
@@ -144,11 +154,14 @@ public class DefaultServlet extends Basi
     
     String sep = "";
     for (Pair<Long,? extends Number> point : (List<Pair<Long,? extends Number>>) data) {
-      if (point.getSecond() == null) continue;
+      if (point.getSecond() == null)
+        continue;
       
       String y;
-      if (point.getSecond() instanceof Double) y = String.format("%1.2f", point.getSecond());
-      else y = point.getSecond().toString();
+      if (point.getSecond() instanceof Double)
+        y = String.format("%1.2f", point.getSecond());
+      else
+        y = point.getSecond().toString();
       
       sb.append(sep);
       sep = ",";
@@ -156,7 +169,8 @@ public class DefaultServlet extends Basi
     }
     
     String opts = "lines: { show: true }";
-    if (points) opts = "points: { show: true, radius: 1 }";
+    if (points)
+      opts = "points: { show: true, radius: 1 }";
     
     sb.append("    ];\n");
     sb.append("    $.plot($(\"#" + id + "\"), [{ data: d1, " + opts

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/GcStatusServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/GcStatusServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/GcStatusServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/GcStatusServlet.java Thu Oct 27 15:24:51 2011
@@ -49,14 +49,18 @@ public class GcStatusServlet extends Bas
       gcActivity.addSortableColumn("Errors", new NumberType<Long>(0l, 1l), null);
       gcActivity.addSortableColumn("Duration", new DurationType(), null);
       
-      if (status.last.finished > 0) gcActivity.addRow("File&nbsp;Collection,&nbsp;Last&nbsp;Cycle", status.last.finished, status.last.candidates,
-          status.last.deleted, status.last.inUse, status.last.errors, status.last.finished - status.last.started);
-      if (status.current.started > 0) gcActivity.addRow("File&nbsp;Collection,&nbsp;Running", status.current.finished, status.current.candidates,
-          status.current.deleted, status.current.inUse, status.current.errors, System.currentTimeMillis() - status.current.started);
-      if (status.lastLog.finished > 0) gcActivity.addRow("WAL&nbsp;Collection,&nbsp;Last&nbsp;Cycle", status.lastLog.finished, status.lastLog.candidates,
-          status.lastLog.deleted, status.lastLog.inUse, status.lastLog.errors, status.lastLog.finished - status.lastLog.started);
-      if (status.currentLog.started > 0) gcActivity.addRow("WAL&nbsp;Collection,&nbsp;Running", status.currentLog.finished, status.currentLog.candidates,
-          status.currentLog.deleted, status.currentLog.inUse, status.currentLog.errors, System.currentTimeMillis() - status.currentLog.started);
+      if (status.last.finished > 0)
+        gcActivity.addRow("File&nbsp;Collection,&nbsp;Last&nbsp;Cycle", status.last.finished, status.last.candidates, status.last.deleted, status.last.inUse,
+            status.last.errors, status.last.finished - status.last.started);
+      if (status.current.started > 0)
+        gcActivity.addRow("File&nbsp;Collection,&nbsp;Running", status.current.finished, status.current.candidates, status.current.deleted,
+            status.current.inUse, status.current.errors, System.currentTimeMillis() - status.current.started);
+      if (status.lastLog.finished > 0)
+        gcActivity.addRow("WAL&nbsp;Collection,&nbsp;Last&nbsp;Cycle", status.lastLog.finished, status.lastLog.candidates, status.lastLog.deleted,
+            status.lastLog.inUse, status.lastLog.errors, status.lastLog.finished - status.lastLog.started);
+      if (status.currentLog.started > 0)
+        gcActivity.addRow("WAL&nbsp;Collection,&nbsp;Running", status.currentLog.finished, status.currentLog.candidates, status.currentLog.deleted,
+            status.currentLog.inUse, status.currentLog.errors, System.currentTimeMillis() - status.currentLog.started);
       gcActivity.generate(req, sb);
     } else {
       banner(sb, "error", "Collector is Unavailable");

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LogServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LogServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LogServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LogServlet.java Thu Oct 27 15:24:51 2011
@@ -49,7 +49,8 @@ public class LogServlet extends BasicSer
     for (LoggingEvent ev : LogService.getInstance().getEvents()) {
       clear = false;
       Object application = ev.getMDC("application");
-      if (application == null) application = "";
+      if (application == null)
+        application = "";
       String msg = ev.getMessage().toString();
       StringBuilder text = new StringBuilder();
       for (int i = 0; i < msg.length(); i++) {
@@ -66,16 +67,18 @@ public class LogServlet extends BasicSer
         
       }
       msg = text.toString();
-      if (ev.getThrowableStrRep() != null) for (String line : ev.getThrowableStrRep())
-        msg += "\n\t" + line;
+      if (ev.getThrowableStrRep() != null)
+        for (String line : ev.getThrowableStrRep())
+          msg += "\n\t" + line;
       msg = sanitize(msg.trim());
       msg = "<pre class='logevent'>" + msg + "</pre>";
       logTable.addRow(ev.getTimeStamp(), application, ev.getLevel(), msg);
     }
-    if (!clear) logTable.setSubCaption("<a href='/op?action=clearLog&redir=" + currentPage(req) + "'>Clear&nbsp;All&nbsp;Events</a>");
+    if (!clear)
+      logTable.setSubCaption("<a href='/op?action=clearLog&redir=" + currentPage(req) + "'>Clear&nbsp;All&nbsp;Events</a>");
     logTable.generate(req, sb);
-    if (!clear) sb.append("<div class='center'><a href='/op?action=clearLog&redir=").append(currentPage(req))
-        .append("'>Clear&nbsp;All&nbsp;Events</a></div>\n");
+    if (!clear)
+      sb.append("<div class='center'><a href='/op?action=clearLog&redir=").append(currentPage(req)).append("'>Clear&nbsp;All&nbsp;Events</a></div>\n");
   }
   
   private static class LogLevelType extends StringType<Level> {
@@ -86,11 +89,15 @@ public class LogServlet extends BasicSer
     
     @Override
     public String format(Object obj) {
-      if (obj == null) return "-";
+      if (obj == null)
+        return "-";
       Level l = (Level) obj;
-      if (l.equals(Level.ERROR) || l.equals(Level.FATAL)) return "<div class='error'>" + l.toString() + "</div>";
-      else if (l.equals(Level.WARN)) return "<div class='warning'>" + l.toString() + "</div>";
-      else return l.toString();
+      if (l.equals(Level.ERROR) || l.equals(Level.FATAL))
+        return "<div class='error'>" + l.toString() + "</div>";
+      else if (l.equals(Level.WARN))
+        return "<div class='warning'>" + l.toString() + "</div>";
+      else
+        return l.toString();
     }
   }
 }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LoggersServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LoggersServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LoggersServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/LoggersServlet.java Thu Oct 27 15:24:51 2011
@@ -46,7 +46,8 @@ public class LoggersServlet extends Basi
     if (loggerAddress == null || loggerAddress.isEmpty()) {
       
       ArrayList<LoggerStatus> loggers = new ArrayList<LoggerStatus>();
-      if (Monitor.getMmi() != null) loggers.addAll(Monitor.getMmi().loggers);
+      if (Monitor.getMmi() != null)
+        loggers.addAll(Monitor.getMmi().loggers);
       
       Table loggerList = new Table("loggers", "Logger&nbsp;Servers");
       
@@ -59,7 +60,8 @@ public class LoggersServlet extends Basi
     loggerList.addSortableColumn("Server", new LoggerLinkType(), null);
     
     for (LoggerStatus status : loggers) {
-      if (status == null) status = NO_STATUS;
+      if (status == null)
+        status = NO_STATUS;
       RecoveryStatus s = new RecoveryStatus();
       s.host = status.logger;
       loggerList.addRow(s);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java Thu Oct 27 15:24:51 2011
@@ -105,7 +105,8 @@ public class MasterServlet extends Basic
           gcStatus = label + " " + DateFormat.getInstance().format(new Date(start));
           gcStatus = gcStatus.replace(" ", "&nbsp;");
           long normalDelay = AccumuloConfiguration.getSystemConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY);
-          if (diff > normalDelay * 2) gcStatus = "<span class='warning'>" + gcStatus + "</span>";
+          if (diff > normalDelay * 2)
+            gcStatus = "<span class='warning'>" + gcStatus + "</span>";
         }
       } else {
         gcStatus = "<span class='error'>Down</span>";
@@ -151,7 +152,8 @@ public class MasterServlet extends Basic
       masterStatus.addRow(row);
       masterStatus.generate(req, sb);
       
-    } else banner(sb, "error", "Master Server Not Running");
+    } else
+      banner(sb, "error", "Master Server Not Running");
     
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/OperationServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/OperationServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/OperationServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/OperationServlet.java Thu Oct 27 15:24:51 2011
@@ -42,7 +42,8 @@ public class OperationServlet extends Ba
     try {
       String operation = req.getParameter("action");
       redir = req.getParameter("redir");
-      if (redir != null) redir = decode(redir);
+      if (redir != null)
+        redir = decode(redir);
       
       if (operation != null) {
         for (Class<?> subclass : OperationServlet.class.getClasses()) {
@@ -65,8 +66,10 @@ public class OperationServlet extends Ba
       log.error(t, t);
     } finally {
       try {
-        if (redir != null) resp.sendRedirect(redir);
-        else resp.sendRedirect("/");
+        if (redir != null)
+          resp.sendRedirect(redir);
+        else
+          resp.sendRedirect("/");
         resp.flushBuffer();
       } catch (Throwable t) {
         log.error(t, t);
@@ -110,9 +113,11 @@ public class OperationServlet extends Ba
     public void execute(HttpServletRequest req, HttpServletResponse resp, Logger log) {
       String table = req.getParameter("table");
       String resource = req.getParameter("resource");
-      if (resource != null) resource = decode(resource);
+      if (resource != null)
+        resource = decode(resource);
       String ptype = req.getParameter("ptype");
-      if (ptype != null) ptype = decode(ptype);
+      if (ptype != null)
+        ptype = decode(ptype);
       try {
         ProblemReports.getInstance().deleteProblemReport(table, ProblemType.valueOf(ptype), resource);
       } catch (Exception e) {
@@ -128,9 +133,12 @@ public class OperationServlet extends Ba
       String table = req.getParameter("table");
       String asc = req.getParameter("asc");
       String col = req.getParameter("col");
-      if (table == null || page == null || (asc == null && col == null)) return;
-      if (asc == null) resp.addCookie(new Cookie("tableSort." + page + "." + table + "." + "sortCol", col));
-      else resp.addCookie(new Cookie("tableSort." + page + "." + table + "." + "sortAsc", asc));
+      if (table == null || page == null || (asc == null && col == null))
+        return;
+      if (asc == null)
+        resp.addCookie(new Cookie("tableSort." + page + "." + table + "." + "sortCol", col));
+      else
+        resp.addCookie(new Cookie("tableSort." + page + "." + table + "." + "sortAsc", asc));
     }
   }
   
@@ -140,7 +148,8 @@ public class OperationServlet extends Ba
       String page = req.getParameter("page");
       String table = req.getParameter("table");
       String show = req.getParameter("show");
-      if (table == null || page == null || show == null) return;
+      if (table == null || page == null || show == null)
+        return;
       resp.addCookie(new Cookie("tableLegend." + page + "." + table + "." + "show", show));
     }
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/ProblemServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/ProblemServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/ProblemServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/ProblemServlet.java Thu Oct 27 15:24:51 2011
@@ -54,7 +54,8 @@ public class ProblemServlet extends Basi
   }
   
   private static void doProblemSummary(final HttpServletRequest req, StringBuilder sb, final Map<String,String> tidToNameMap) {
-    if (Monitor.getProblemSummary().isEmpty() && Monitor.getProblemException() == null) return;
+    if (Monitor.getProblemSummary().isEmpty() && Monitor.getProblemException() == null)
+      return;
     
     Table problemSummary = new Table("problemSummary", "Problem&nbsp;Summary", "error");
     problemSummary.addSortableColumn("Table", new TableProblemLinkType(tidToNameMap), null);
@@ -67,7 +68,8 @@ public class ProblemServlet extends Basi
       cell.append("<b>Failed to obtain problem reports</b> : " + Monitor.getProblemException().getMessage());
       Throwable cause = Monitor.getProblemException().getCause();
       while (cause != null) {
-        if (cause.getMessage() != null) cell.append("<br />\n caused by : " + cause.getMessage());
+        if (cause.getMessage() != null)
+          cell.append("<br />\n caused by : " + cause.getMessage());
         cause = cause.getCause();
       }
       problemSummary.setSubCaption(cell.toString());
@@ -88,7 +90,8 @@ public class ProblemServlet extends Basi
   
   private static void doProblemDetails(final HttpServletRequest req, StringBuilder sb, String tableId, Map<String,String> tidToNameMap) {
     
-    if (Monitor.getProblemException() != null) return;
+    if (Monitor.getProblemException() != null)
+      return;
     
     ArrayList<ProblemReport> problemReports = new ArrayList<ProblemReport>();
     Iterator<ProblemReport> iter = tableId == null ? ProblemReports.getInstance().iterator() : ProblemReports.getInstance().iterator(tableId);
@@ -127,7 +130,8 @@ public class ProblemServlet extends Basi
     
     @Override
     public String format(Object obj) {
-      if (obj == null) return "-";
+      if (obj == null)
+        return "-";
       String table = String.valueOf(obj);
       return String.format("<a href='/problems?table=%s'>%s</a>", table, Tables.getPrintableTableNameFromId(tidToNameMap, table));
     }
@@ -149,7 +153,8 @@ public class ProblemServlet extends Basi
     
     @Override
     public String format(Object obj) {
-      if (obj == null) return "-";
+      if (obj == null)
+        return "-";
       String table = String.valueOf(obj);
       return String.format("<a href='/op?table=%s&action=clearTableProblems&redir=%s'>clear ALL %s problems</a>", table, currentPage(req),
           Tables.getPrintableTableNameFromId(tidToNameMap, table));
@@ -170,7 +175,8 @@ public class ProblemServlet extends Basi
     
     @Override
     public String format(Object obj) {
-      if (obj == null) return "-";
+      if (obj == null)
+        return "-";
       ProblemReport p = (ProblemReport) obj;
       return String.format("<a href='/op?table=%s&action=clearProblem&redir=%s&resource=%s&ptype=%s'>clear this problem</a>", p.getTableName(),
           currentPage(req), encode(p.getResource()), encode(p.getProblemType().name()));

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java Thu Oct 27 15:24:51 2011
@@ -79,7 +79,8 @@ public class TServersServlet extends Bas
       doBadTserverList(req, sb);
       
       ArrayList<TabletServerStatus> tservers = new ArrayList<TabletServerStatus>();
-      if (Monitor.getMmi() != null) tservers.addAll(Monitor.getMmi().tServerInfo);
+      if (Monitor.getMmi() != null)
+        tservers.addAll(Monitor.getMmi().tServerInfo);
       
       Table tServerList = new Table("tservers", "Tablet&nbsp;Servers");
       tServerList.setSubCaption("Click on the <span style='color: #0000ff;'>server address</span> to view detailed performance statistics for that server.");
@@ -168,11 +169,14 @@ public class TServersServlet extends Bas
     }
     
     // Calculate current averages oldServer adding in historical data
-    if (total.minor.num != 0) currentMinorAvg = (long) (total.minor.elapsed / total.minor.num);
-    if (total.minor.elapsed != 0 && total.minor.num != 0) currentMinorStdDev = (long) stddev(total.minor.elapsed, total.minor.num, total.minor.sumDev);
-    if (total.major.num != 0) currentMajorAvg = total.major.elapsed / total.major.num;
-    if (total.major.elapsed != 0 && total.major.num != 0 && total.major.elapsed > total.major.num) currentMajorStdDev = (long) stddev(total.major.elapsed,
-        total.major.num, total.major.sumDev);
+    if (total.minor.num != 0)
+      currentMinorAvg = (long) (total.minor.elapsed / total.minor.num);
+    if (total.minor.elapsed != 0 && total.minor.num != 0)
+      currentMinorStdDev = (long) stddev(total.minor.elapsed, total.minor.num, total.minor.sumDev);
+    if (total.major.num != 0)
+      currentMajorAvg = total.major.elapsed / total.major.num;
+    if (total.major.elapsed != 0 && total.major.num != 0 && total.major.elapsed > total.major.num)
+      currentMajorStdDev = (long) stddev(total.major.elapsed, total.major.num, total.major.sumDev);
     
     // After these += operations, these variables are now total for current
     // tablets and historical tablets
@@ -238,7 +242,8 @@ public class TServersServlet extends Bas
   }
   
   private static double stddev(double elapsed, double num, double sumDev) {
-    if (elapsed != 0 && num != 0 && elapsed > num) return Math.sqrt((1 / (elapsed / num)) * (sumDev - (num * Math.pow((elapsed / num), 2))));
+    if (elapsed != 0 && num != 0 && elapsed > num)
+      return Math.sqrt((1 / (elapsed / num)) * (sumDev - (num * Math.pow((elapsed / num), 2))));
     return 0;
   }
   
@@ -288,7 +293,8 @@ public class TServersServlet extends Bas
         "The Unix one minute load average. The average number of processes in the run queue over a one minute interval.");
     
     for (TabletServerStatus status : tservers) {
-      if (status == null) status = NO_STATUS;
+      if (status == null)
+        status = NO_STATUS;
       TableInfo summary = Monitor.summarizeTableStats(status);
       TableRow row = tServerList.prepareRow();
       row.add(status); // add for server name

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java Thu Oct 27 15:24:51 2011
@@ -72,7 +72,8 @@ public class TablesServlet extends Basic
   
   static void doProblemsBanner(StringBuilder sb) {
     int numProblems = Monitor.getProblemSummary().entrySet().size();
-    if (numProblems > 0) banner(sb, "error", String.format("<a href='/problems'>Table Problems: %d Total</a>", numProblems));
+    if (numProblems > 0)
+      banner(sb, "error", String.format("<a href='/problems'>Table Problems: %d Total</a>", numProblems));
   }
   
   static void doTableList(HttpServletRequest req, StringBuilder sb, Map<String,String> tidToNameMap) {
@@ -100,8 +101,9 @@ public class TablesServlet extends Basic
             + "They reduce the number of files used during queries.");
     SortedMap<String,TableInfo> tableStats = new TreeMap<String,TableInfo>();
     
-    if (Monitor.getMmi() != null && Monitor.getMmi().tableMap != null) for (Entry<String,TableInfo> te : Monitor.getMmi().tableMap.entrySet())
-      tableStats.put(Tables.getPrintableTableNameFromId(tidToNameMap, te.getKey()), te.getValue());
+    if (Monitor.getMmi() != null && Monitor.getMmi().tableMap != null)
+      for (Entry<String,TableInfo> te : Monitor.getMmi().tableMap.entrySet())
+        tableStats.put(Tables.getPrintableTableNameFromId(tidToNameMap, te.getKey()), te.getValue());
     
     Map<String,Double> compactingByTable = Monitor.summarizeTableStats(Monitor.getMmi());
     TableManager tableManager = TableManager.getInstance();
@@ -111,7 +113,8 @@ public class TablesServlet extends Basic
       String tableId = tableName_tableId.getValue();
       TableInfo tableInfo = tableStats.get(tableName);
       Double holdTime = compactingByTable.get(tableId);
-      if (holdTime == null) holdTime = new Double(0.);
+      if (holdTime == null)
+        holdTime = new Double(0.);
       TableRow row = tableList.prepareRow();
       row.add(tableId);
       row.add(tableManager.getTableState(tableId));
@@ -154,7 +157,8 @@ public class TablesServlet extends Basic
       for (TabletServerStatus tss : Monitor.getMmi().tServerInfo) {
         try {
           log.debug("tss: " + tss.name);
-          if (tss.name != null && locs.contains(tss.name)) tservers.add(tss);
+          if (tss.name != null && locs.contains(tss.name))
+            tservers.add(tss);
         } catch (Exception ex) {
           log.error(ex, ex);
         }



Mime
View raw message