accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [30/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/test/randomwalk/sequential/BatchVerify.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java Thu Oct 27 15:24:51 2011
@@ -67,7 +67,8 @@ public class BatchVerify extends Test {
     ranges = Range.mergeOverlapping(ranges);
     Collections.sort(ranges);
     
-    if (count == 0 || ranges.size() == 0) return;
+    if (count == 0 || ranges.size() == 0)
+      return;
     
     log.debug(String.format("scanning %d rows in the following %d ranges:", count, ranges.size()));
     for (Range r : ranges) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java Thu Oct 27 15:24:51 2011
@@ -36,7 +36,8 @@ public class Delete extends Test {
     Random rand = (Random) state.get("rand");
     
     Entry<Key,Value> entry = Search.findRandomDocument(state, dataTableName, rand);
-    if (entry == null) return;
+    if (entry == null)
+      return;
     
     String docID = entry.getKey().getRow().toString();
     String doc = entry.getValue().toString();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java Thu Oct 27 15:24:51 2011
@@ -32,8 +32,10 @@ public class Flush extends Test {
     
     String table;
     
-    if (rand.nextDouble() < .5) table = indexTableName;
-    else table = dataTableName;
+    if (rand.nextDouble() < .5)
+      table = indexTableName;
+    else
+      table = dataTableName;
     
     state.getConnector().tableOperations().flush(table);
     log.debug("Flushed " + table);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java Thu Oct 27 15:24:51 2011
@@ -76,7 +76,8 @@ public class Insert extends Test {
     for (int i = 0; i < numWords; i++) {
       String word = generateRandomWord(rand);
       
-      if (i > 0) sb.append(" ");
+      if (i > 0)
+        sb.append(" ");
       
       sb.append(word);
     }
@@ -115,12 +116,15 @@ public class Insert extends Test {
       
       if (!tokensSeen.contains(token)) {
         tokensSeen.add(token);
-        if (delete) m.putDelete(token, docId);
-        else m.put(token, docId, new Value(new byte[0]));
+        if (delete)
+          m.putDelete(token, docId);
+        else
+          m.put(token, docId, new Value(new byte[0]));
       }
     }
     
-    if (m.size() > 0) bw.addMutation(m);
+    if (m.size() > 0)
+      bw.addMutation(m);
   }
   
 }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Reindex.java Thu Oct 27 15:24:51 2011
@@ -70,17 +70,19 @@ public class Reindex extends Test {
     count = 0;
     
     for (Entry<Key,Value> entry : indexScanner1) {
-      if (!iter.hasNext()) throw new Exception("index rebuild mismatch " + entry.getKey() + " " + indexTableName);
+      if (!iter.hasNext())
+        throw new Exception("index rebuild mismatch " + entry.getKey() + " " + indexTableName);
       
       Key key1 = entry.getKey();
       Key key2 = iter.next().getKey();
       
-      if (key1.compareTo(key2, PartialKey.ROW_COLFAM_COLQUAL) != 0) throw new Exception("index rebuild mismatch " + key1 + " " + key2 + " " + indexTableName
-          + " " + tmpIndexTableName);
+      if (key1.compareTo(key2, PartialKey.ROW_COLFAM_COLQUAL) != 0)
+        throw new Exception("index rebuild mismatch " + key1 + " " + key2 + " " + indexTableName + " " + tmpIndexTableName);
       count++;
     }
     
-    if (iter.hasNext()) throw new Exception("index rebuild mismatch " + iter.next().getKey() + " " + tmpIndexTableName);
+    if (iter.hasNext())
+      throw new Exception("index rebuild mismatch " + iter.next().getKey() + " " + tmpIndexTableName);
     
     log.debug("Verified " + count + " index entries ");
     

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java Thu Oct 27 15:24:51 2011
@@ -44,14 +44,16 @@ public class Search extends Test {
     Random rand = (Random) state.get("rand");
     
     Entry<Key,Value> entry = findRandomDocument(state, dataTableName, rand);
-    if (entry == null) return;
+    if (entry == null)
+      return;
     
     Text docID = entry.getKey().getRow();
     String doc = entry.getValue().toString();
     
     String[] tokens = doc.split("\\W+");
     int numSearchTerms = rand.nextInt(6);
-    if (numSearchTerms < 2) numSearchTerms = 2;
+    if (numSearchTerms < 2)
+      numSearchTerms = 2;
     
     HashSet<String> searchTerms = new HashSet<String>();
     while (searchTerms.size() < numSearchTerms)
@@ -83,7 +85,8 @@ public class Search extends Test {
     
     bs.close();
     
-    if (!sawDocID) throw new Exception("Did not see doc " + docID + " in index.  terms:" + searchTerms + " " + indexTableName + " " + dataTableName);
+    if (!sawDocID)
+      throw new Exception("Did not see doc " + docID + " in index.  terms:" + searchTerms + " " + indexTableName + " " + dataTableName);
   }
   
   static Entry<Key,Value> findRandomDocument(State state, String dataTableName, Random rand) throws Exception {
@@ -92,7 +95,8 @@ public class Search extends Test {
     scanner.setRange(new Range(Integer.toString(rand.nextInt(0xfffffff), 16), null));
     
     Iterator<Entry<Key,Value>> iter = scanner.iterator();
-    if (!iter.hasNext()) return null;
+    if (!iter.hasNext())
+      return null;
     
     return iter.next();
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java Thu Oct 27 15:24:51 2011
@@ -115,7 +115,8 @@ public class TraceServer implements Watc
       TCompactProtocol protocol = new TCompactProtocol(transport);
       s.write(protocol);
       String parentString = Long.toHexString(s.parentId);
-      if (s.parentId == Span.ROOT_SPAN_ID) parentString = "";
+      if (s.parentId == Span.ROOT_SPAN_ID)
+        parentString = "";
       put(spanMutation, "span", parentString + ":" + Long.toHexString(s.spanId), transport.get(), transport.len());
       // Map the root span to time so we can look up traces by time
       Mutation timeMutation = null;
@@ -126,7 +127,8 @@ public class TraceServer implements Watc
       try {
         writer.addMutation(spanMutation);
         writer.addMutation(indexMutation);
-        if (timeMutation != null) writer.addMutation(timeMutation);
+        if (timeMutation != null)
+          writer.addMutation(timeMutation);
       } catch (Exception ex) {
         log.error("Unable to write mutation to table: " + spanMutation, ex);
       }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java Thu Oct 27 15:24:51 2011
@@ -94,23 +94,28 @@ public class UpgradeAccumuloSite {
       
       Property p = Property.getPropertyByKey(entry.property);
       if (p != null) {
-        if (p.getDefaultValue().equals(entry.value)) continue;
+        if (p.getDefaultValue().equals(entry.value))
+          continue;
         
         if (p.getType().equals(PropertyType.TIMEDURATION)) {
           int value = Integer.parseInt(entry.value);
           if (value > 1000) {
-            if (value % 1000 == 0) entry.value = String.format("%ds", value / 1000);
-            else entry.value = String.format("%.2fs", value / 1000.);
+            if (value % 1000 == 0)
+              entry.value = String.format("%ds", value / 1000);
+            else
+              entry.value = String.format("%.2fs", value / 1000.);
           }
         }
-        if (entry.property.equals("table.scan.max.time")) entry.value = entry.value + "ms";
+        if (entry.property.equals("table.scan.max.time"))
+          entry.value = entry.value + "ms";
       }
       
       out.println("   <property>");
       out.println("      <name>" + entry.property + "</name>");
       
       out.println("      <value>" + entry.value + "</value>");
-      if (entry.description.trim().length() > 0) out.println("      <description>" + entry.description + "</description>");
+      if (entry.description.trim().length() > 0)
+        out.println("      <description>" + entry.description + "</description>");
       out.println("   </property>\n");
     }
     out.println("</configuration>");

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java Thu Oct 27 15:24:51 2011
@@ -82,9 +82,11 @@ public class UpgradeMetadataTable {
       }
     }
     
-    if (files.size() == 0) throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no files");
+    if (files.size() == 0)
+      throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no files");
     
-    if (prevRow == null) throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no prevrow");
+    if (prevRow == null)
+      throw new Exception("Tablet " + tabletEntries.lastKey().getRow() + " has no prevrow");
     
     KeyExtent ke = new KeyExtent(new Text(tabletEntries.lastKey().getRow()), prevRow);
     // System.out.println("*** Processing tablet "+tabletEntries.lastKey().getRow()+" "+prevRow+" "+files);
@@ -136,10 +138,12 @@ public class UpgradeMetadataTable {
             val = rencodeDatafileValue(val);
           } else if (Constants.METADATA_PREV_ROW_COLUMN.equals(newKey.getColumnFamily(), newKey.getColumnQualifier())) {
             Text per = KeyExtent.decodePrevEndRow(val);
-            if (per == null) val = new Value(val.get(), true);
-            else if (new KeyExtent(newKey.getRow(), (Text) null).getTableId().toString().equals(Constants.METADATA_TABLE_ID) && per.getBytes()[0] != '~') val = KeyExtent
-                .encodePrevEndRow(translateRow(per, tableIds));
-            else val = new Value(val.get(), true);
+            if (per == null)
+              val = new Value(val.get(), true);
+            else if (new KeyExtent(newKey.getRow(), (Text) null).getTableId().toString().equals(Constants.METADATA_TABLE_ID) && per.getBytes()[0] != '~')
+              val = KeyExtent.encodePrevEndRow(translateRow(per, tableIds));
+            else
+              val = new Value(val.get(), true);
             
           } else {
             val = new Value(val.get(), true);
@@ -304,8 +308,10 @@ public class UpgradeMetadataTable {
       Key logicalTimeKey = new Key(tm.lastKey().getRow(), Constants.METADATA_TIME_COLUMN.getColumnFamily(),
           Constants.METADATA_TIME_COLUMN.getColumnQualifier(), System.currentTimeMillis());
       Value logicalTimeValue;
-      if (tm.lastKey().getRow().toString().startsWith("!0")) logicalTimeValue = new Value(("L" + maxTime).getBytes());
-      else logicalTimeValue = new Value(("M" + System.currentTimeMillis()).getBytes());
+      if (tm.lastKey().getRow().toString().startsWith("!0"))
+        logicalTimeValue = new Value(("L" + maxTime).getBytes());
+      else
+        logicalTimeValue = new Value(("M" + System.currentTimeMillis()).getBytes());
       tm.put(logicalTimeKey, logicalTimeValue);
       
       for (Entry<Key,Value> entry : tm.entrySet()) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java Thu Oct 27 15:24:51 2011
@@ -82,8 +82,10 @@ public class ZooKeeperUpgrade extends In
         zk.create(ZKUserPath + "/" + user + "/Tables", new byte[] {}, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
         List<String> tables = zk.getChildren(ZKUserPath + "/" + user + "/Tables.old", false);
         for (String table : tables) {
-          if (tableIds.containsKey(table)) move(ZKUserPath + "/" + user + "/Tables.old/" + table, ZKUserPath + "/" + user + "/Tables/" + tableIds.get(table));
-          else System.err.println("WARN : User " + user + " has permissions for non-existant table " + table);
+          if (tableIds.containsKey(table))
+            move(ZKUserPath + "/" + user + "/Tables.old/" + table, ZKUserPath + "/" + user + "/Tables/" + tableIds.get(table));
+          else
+            System.err.println("WARN : User " + user + " has permissions for non-existant table " + table);
         }
         
         ZooUtil.recursiveDelete(ZKUserPath + "/" + user + "/Tables.old", NodeMissingPolicy.SKIP);
@@ -130,16 +132,23 @@ public class ZooKeeperUpgrade extends In
       System.out.println(tableName + " is being upgraded");
       
       String tableId;
-      if (!tableName.equals(Constants.METADATA_TABLE_NAME)) tableId = tii.next();
-      else tableId = Constants.METADATA_TABLE_ID;
+      if (!tableName.equals(Constants.METADATA_TABLE_NAME))
+        tableId = tii.next();
+      else
+        tableId = Constants.METADATA_TABLE_ID;
       
       TableManager.prepareNewTableState(HdfsZooInstance.getInstance().getInstanceID(), tableId, tableName, TableState.OFFLINE);
       String oldConfDir = zkInstanceRoot + OLD_TABLE_CONF_DIR + "/" + tableName;
-      if (ZooUtil.exists(oldConfDir)) if (tableId.equals(Constants.METADATA_TABLE_ID)) ZooUtil.recursiveDelete(oldConfDir, NodeMissingPolicy.SKIP);
-      else ZooUtil.recursiveCopyPersistent(oldConfDir, zkInstanceRoot + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF, NodeExistsPolicy.OVERWRITE);
+      if (ZooUtil.exists(oldConfDir))
+        if (tableId.equals(Constants.METADATA_TABLE_ID))
+          ZooUtil.recursiveDelete(oldConfDir, NodeMissingPolicy.SKIP);
+        else
+          ZooUtil.recursiveCopyPersistent(oldConfDir, zkInstanceRoot + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF, NodeExistsPolicy.OVERWRITE);
       
-      if (!tableId.equals(Constants.METADATA_TABLE_ID)) validateConfig(tableId);
-      else initMetadataConfig();
+      if (!tableId.equals(Constants.METADATA_TABLE_ID))
+        validateConfig(tableId);
+      else
+        initMetadataConfig();
     }
     
     // clean up old table configuration directories
@@ -155,7 +164,8 @@ public class ZooKeeperUpgrade extends In
       tableName = tableName.substring(tableName.lastIndexOf('/') + 1);
       tableNames.add(tableName);
     }
-    if (ZooUtil.exists(zkInstanceRoot + OLD_TABLE_CONF_DIR)) tableNames.addAll(ZooSession.getSession().getChildren(zkInstanceRoot + OLD_TABLE_CONF_DIR, false));
+    if (ZooUtil.exists(zkInstanceRoot + OLD_TABLE_CONF_DIR))
+      tableNames.addAll(ZooSession.getSession().getChildren(zkInstanceRoot + OLD_TABLE_CONF_DIR, false));
     return tableNames;
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java Thu Oct 27 15:24:51 2011
@@ -57,24 +57,29 @@ public class Admin {
     
     try {
       cl = new BasicParser().parse(opts, args);
-      if (cl.hasOption("?")) throw new ParseException("help requested");
+      if (cl.hasOption("?"))
+        throw new ParseException("help requested");
       args = cl.getArgs();
       
       user = cl.hasOption("u") ? cl.getOptionValue("u") : "root";
       pass = cl.hasOption("p") ? cl.getOptionValue("p").getBytes() : null;
       
       if (!((cl.getArgs().length == 1 && (args[0].equalsIgnoreCase("stopMaster") || args[0].equalsIgnoreCase("stopAll"))) || (cl.getArgs().length == 2 && args[0]
-          .equalsIgnoreCase("stop")))) throw new ParseException("Incorrect arguments");
+          .equalsIgnoreCase("stop"))))
+        throw new ParseException("Incorrect arguments");
       
     } catch (ParseException e) {
       // print to the log and to stderr
-      if (cl == null || !cl.hasOption("?")) log.error(e, e);
+      if (cl == null || !cl.hasOption("?"))
+        log.error(e, e);
       HelpFormatter h = new HelpFormatter();
       StringWriter str = new StringWriter();
       h.printHelp(new PrintWriter(str), h.getWidth(), Admin.class.getName() + " stopMaster | stopAll | stop <tserver>", null, opts, h.getLeftPadding(),
           h.getDescPadding(), null, true);
-      if (cl != null && cl.hasOption("?")) log.info(str.toString());
-      else log.error(str.toString());
+      if (cl != null && cl.hasOption("?"))
+        log.info(str.toString());
+      else
+        log.error(str.toString());
       h.printHelp(new PrintWriter(System.err), h.getWidth(), Admin.class.getName() + " stopMaster | stopAll | stop <tserver>", null, opts, h.getLeftPadding(),
           h.getDescPadding(), null, true);
       System.exit(3);
@@ -144,7 +149,8 @@ public class Admin {
     try {
       client = MasterClient.getConnection(HdfsZooInstance.getInstance());
     } catch (Throwable t) {
-      if (client != null) MasterClient.close(client);
+      if (client != null)
+        MasterClient.close(client);
       throw new AccumuloException(t.toString());
     }
     return client;

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java Thu Oct 27 15:24:51 2011
@@ -95,8 +95,10 @@ public class CheckForMetadataProblems {
       
       lastEndRow = tabke.getEndRow();
     }
-    if (everythingLooksGood) System.out.println("All is well for table " + tablename);
-    else sawProblems = true;
+    if (everythingLooksGood)
+      System.out.println("All is well for table " + tablename);
+    else
+      sawProblems = true;
   }
   
   public static void checkMetadataTableEntries(boolean offline, boolean patch) throws Exception {
@@ -223,7 +225,8 @@ public class CheckForMetadataProblems {
       System.exit(-1);
     }
     
-    if (sawProblems) System.exit(-1);
+    if (sawProblems)
+      System.exit(-1);
   }
   
 }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java Thu Oct 27 15:24:51 2011
@@ -55,7 +55,8 @@ public class CleanZookeeper {
           for (String instanceName : zk.getChildren(root + Constants.ZINSTANCES, false)) {
             String instanceNamePath = root + Constants.ZINSTANCES + "/" + instanceName;
             byte[] id = zk.getData(instanceNamePath, false, null);
-            if (id != null && !new String(id).equals(HdfsZooInstance.getInstance().getInstanceID())) recursivelyDelete(zk, instanceNamePath);
+            if (id != null && !new String(id).equals(HdfsZooInstance.getInstance().getInstanceID()))
+              recursivelyDelete(zk, instanceNamePath);
           }
         } else if (!child.equals(HdfsZooInstance.getInstance().getInstanceID())) {
           recursivelyDelete(zk, root + "/" + child);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java Thu Oct 27 15:24:51 2011
@@ -80,6 +80,7 @@ public class CountRowKeys extends Config
   
   public static void main(String[] args) throws Exception {
     int res = ToolRunner.run(CachedConfiguration.getInstance(), new CountRowKeys(), args);
-    if (res != 0) System.exit(res);
+    if (res != 0)
+      System.exit(res);
   }
 }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java Thu Oct 27 15:24:51 2011
@@ -53,7 +53,8 @@ public class DeleteZooInstance {
         for (String instance : instances) {
           String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
           byte[] data = zk.getData(path, null, null);
-          if (name.equals(new String(data))) zk.delete(path, -1);
+          if (name.equals(new String(data)))
+            zk.delete(path, -1);
         }
         CleanZookeeper.recursivelyDelete(zk, Constants.ZROOT + "/" + name);
       }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java Thu Oct 27 15:24:51 2011
@@ -86,8 +86,10 @@ public class DumpTable {
         }
         
         while (mfr.next(key, value)) {
-          if (!summarize) log.info(key.getRow());
-          else count++;
+          if (!summarize)
+            log.info(key.getRow());
+          else
+            count++;
         }
         
         if (summarize) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java Thu Oct 27 15:24:51 2011
@@ -53,7 +53,8 @@ public class DumpZookeeper {
     int timeout = 30 * 1000;
     String server = args[0];
     String root = "/";
-    if (args.length > 1) root = args[1];
+    if (args.length > 1)
+      root = args[1];
     try {
       zk = new ZooKeeper(server, timeout, new Watcher() {
         @Override
@@ -61,7 +62,8 @@ public class DumpZookeeper {
       });
       write(out, 0, "<dump root='%s'>", root);
       for (String child : zk.getChildren(root, null))
-        if (!child.equals("zookeeper")) dump(out, root, child, 1);
+        if (!child.equals("zookeeper"))
+          dump(out, root, child, 1);
       write(out, 0, "</dump>");
     } catch (Exception ex) {
       log.error(ex, ex);
@@ -70,9 +72,11 @@ public class DumpZookeeper {
   
   private static void dump(PrintStream out, String root, String child, int indent) throws KeeperException, InterruptedException, UnsupportedEncodingException {
     String path = root + "/" + child;
-    if (root.endsWith("/")) path = root + child;
+    if (root.endsWith("/"))
+      path = root + child;
     Stat stat = zk.exists(path, null);
-    if (stat == null) return;
+    if (stat == null)
+      return;
     String type = "node";
     if (stat.getEphemeralOwner() != 0) {
       type = "ephemeral";
@@ -102,7 +106,8 @@ public class DumpZookeeper {
     byte[] data = zk.getData(path, null, null);
     for (int i = 0; i < data.length; i++) {
       // does this look like simple ascii?
-      if (data[i] < ' ' || data[i] > '~') return new Encoded("base64", new String(Base64.encodeBase64(data), "utf8"));
+      if (data[i] < ' ' || data[i] > '~')
+        return new Encoded("base64", new String(Base64.encodeBase64(data), "utf8"));
     }
     return new Encoded("utf8", new String(data, "utf8"));
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java Thu Oct 27 15:24:51 2011
@@ -75,9 +75,12 @@ public class FileSystemMonitor {
     List<Mount> mounts = parse(procFile);
     
     for (Mount mount : mounts) {
-      if (mount.options.contains("rw")) readWriteFilesystems.put(mount.mountPoint, true);
-      else if (mount.options.contains("ro")) readWriteFilesystems.put(mount.mountPoint, false);
-      else throw new IOException("Filesystem " + mount + " does not have ro or rw option");
+      if (mount.options.contains("rw"))
+        readWriteFilesystems.put(mount.mountPoint, true);
+      else if (mount.options.contains("ro"))
+        readWriteFilesystems.put(mount.mountPoint, false);
+      else
+        throw new IOException("Filesystem " + mount + " does not have ro or rw option");
     }
     
     TimerTask tt = new TimerTask() {
@@ -119,11 +122,15 @@ public class FileSystemMonitor {
     List<Mount> mounts = parse(procFile);
     
     for (Mount mount : mounts) {
-      if (!readWriteFilesystems.containsKey(mount.mountPoint)) if (mount.options.contains("rw")) readWriteFilesystems.put(mount.mountPoint, true);
-      else if (mount.options.contains("ro")) readWriteFilesystems.put(mount.mountPoint, false);
-      else throw new Exception("Filesystem " + mount + " does not have ro or rw option");
-      else if (mount.options.contains("ro") && readWriteFilesystems.get(mount.mountPoint)) throw new Exception("Filesystem " + mount.mountPoint
-          + " switched to read only");
+      if (!readWriteFilesystems.containsKey(mount.mountPoint))
+        if (mount.options.contains("rw"))
+          readWriteFilesystems.put(mount.mountPoint, true);
+        else if (mount.options.contains("ro"))
+          readWriteFilesystems.put(mount.mountPoint, false);
+        else
+          throw new Exception("Filesystem " + mount + " does not have ro or rw option");
+      else if (mount.options.contains("ro") && readWriteFilesystems.get(mount.mountPoint))
+        throw new Exception("Filesystem " + mount.mountPoint + " switched to read only");
     }
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java Thu Oct 27 15:24:51 2011
@@ -49,7 +49,8 @@ public class Halt {
         }
       }.start();
       
-      if (runnable != null) runnable.run();
+      if (runnable != null)
+        runnable.run();
       Runtime.getRuntime().halt(status);
     } finally {
       // In case something else decides to throw a Runtime exception

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java Thu Oct 27 15:24:51 2011
@@ -66,7 +66,8 @@ public class Initialize {
   private static ConsoleReader reader = null;
   
   private static ConsoleReader getConsoleReader() throws IOException {
-    if (reader == null) reader = new ConsoleReader();
+    if (reader == null)
+      reader = new ConsoleReader();
     return reader;
   }
   
@@ -288,7 +289,8 @@ public class Initialize {
     ZooUtil.putPersistentData(Constants.ZROOT + Constants.ZINSTANCES, new byte[0], NodeExistsPolicy.SKIP);
     
     // setup instance name
-    if (clearInstanceName) ZooUtil.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
+    if (clearInstanceName)
+      ZooUtil.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
     ZooUtil.putPersistentData(instanceNamePath, uuid.getBytes(), NodeExistsPolicy.FAIL);
     
     // setup the instance
@@ -316,16 +318,19 @@ public class Initialize {
     boolean exists = true;
     do {
       instanceName = getConsoleReader().readLine("Instance name : ");
-      if (instanceName == null) System.exit(0);
+      if (instanceName == null)
+        System.exit(0);
       instanceName = instanceName.trim();
-      if (instanceName.length() == 0) continue;
+      if (instanceName.length() == 0)
+        continue;
       instanceNamePath = Constants.ZROOT + Constants.ZINSTANCES + "/" + instanceName;
       if (clearInstanceName) {
         exists = false;
         break;
       } else if ((boolean) (exists = ZooUtil.exists(instanceNamePath))) {
         String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : ");
-        if (decision == null) System.exit(0);
+        if (decision == null)
+          System.exit(0);
         if (decision.length() == 1 && decision.toLowerCase(Locale.ENGLISH).charAt(0) == 'y') {
           clearInstanceName = true;
           exists = false;
@@ -340,10 +345,13 @@ public class Initialize {
     String confirmpass;
     do {
       rootpass = getConsoleReader().readLine("Enter initial password for " + ROOT_USER + ": ", '*');
-      if (rootpass == null) System.exit(0);
+      if (rootpass == null)
+        System.exit(0);
       confirmpass = getConsoleReader().readLine("Confirm initial password for " + ROOT_USER + ": ", '*');
-      if (confirmpass == null) System.exit(0);
-      if (!rootpass.equals(confirmpass)) log.error("Passwords do not match");
+      if (confirmpass == null)
+        System.exit(0);
+      if (!rootpass.equals(confirmpass))
+        log.error("Passwords do not match");
     } while (!rootpass.equals(confirmpass));
     return rootpass.getBytes();
   }
@@ -355,8 +363,8 @@ public class Initialize {
   protected static void initMetadataConfig() throws IOException {
     try {
       for (Entry<String,String> entry : initialMetadataConf.entrySet())
-        if (!TablePropUtil.setTableProperty(Constants.METADATA_TABLE_ID, entry.getKey(), entry.getValue())) throw new IOException(
-            "Cannot create per-table property " + entry.getKey());
+        if (!TablePropUtil.setTableProperty(Constants.METADATA_TABLE_ID, entry.getKey(), entry.getValue()))
+          throw new IOException("Cannot create per-table property " + entry.getKey());
     } catch (Exception e) {
       log.fatal("error talking to zookeeper", e);
       throw new IOException(e);
@@ -387,9 +395,12 @@ public class Initialize {
       FileSystem fs;
       fs = FileSystem.get(conf);
       if (justSecurity) {
-        if (isInitialized(fs)) initSecurity(HdfsZooInstance.getInstance().getInstanceID(), getRootPassword());
-        else log.fatal("Attempted to reset security on accumulo before it was initialized");
-      } else if (!doInit(conf, fs)) System.exit(-1);
+        if (isInitialized(fs))
+          initSecurity(HdfsZooInstance.getInstance().getInstanceID(), getRootPassword());
+        else
+          log.fatal("Attempted to reset security on accumulo before it was initialized");
+      } else if (!doInit(conf, fs))
+        System.exit(-1);
     } catch (Exception e) {
       log.fatal(e, e);
       throw new RuntimeException(e);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java Thu Oct 27 15:24:51 2011
@@ -205,7 +205,8 @@ public class ListInstances {
       List<String> children = zk.getChildren(Constants.ZROOT, false);
       
       for (String iid : children) {
-        if (iid.equals("instances")) continue;
+        if (iid.equals("instances"))
+          continue;
         try {
           ts.add(UUID.fromString(iid));
         } catch (Exception e) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java Thu Oct 27 15:24:51 2011
@@ -105,7 +105,8 @@ public class MapFilePerformanceTest {
     Key key = new Key();
     
     while (in.next(key)) {
-      if (r.nextDouble() < percentage) keys.add(new Key(key));
+      if (r.nextDouble() < percentage)
+        keys.add(new Key(key));
     }
     
     in.close();
@@ -164,7 +165,8 @@ public class MapFilePerformanceTest {
     int misses = 0;
     for (Key key : queries) {
       mmfi.seek(new Range(key, null), LocalityGroupUtil.EMPTY_CF_SET, false);
-      if (mmfi.getTopKey().compareTo(key) != 0) misses++;
+      if (mmfi.getTopKey().compareTo(key) != 0)
+        misses++;
       count++;
     }
     

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Thu Oct 27 15:24:51 2011
@@ -114,7 +114,8 @@ public class MetadataTable extends org.a
   public static void update(AuthInfo credentials, ZooLock zooLock, Mutation m) {
     Writer t;
     t = getMetadataTable(credentials);
-    if (zooLock != null) putLockID(zooLock, m);
+    if (zooLock != null)
+      putLockID(zooLock, m);
     while (true) {
       try {
         t.update(m);
@@ -170,7 +171,8 @@ public class MetadataTable extends org.a
             UtilWaitThread.sleep(1000);
           }
         }
-        if (unusedWalLogs.size() > 0 && !foundEntry) log.warn("WALog entry for root tablet did not exist " + unusedWalLogs);
+        if (unusedWalLogs.size() > 0 && !foundEntry)
+          log.warn("WALog entry for root tablet did not exist " + unusedWalLogs);
       }
       return;
     }
@@ -181,7 +183,8 @@ public class MetadataTable extends org.a
       m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(path), new Value(dfv.encode()));
       ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(time.getBytes()));
       // erase the old location
-      if (lastLocation != null) lastLocation.clearLastLocation(m);
+      if (lastLocation != null)
+        lastLocation.clearLastLocation(m);
       // stuff in this location
       TServerInstance self = getTServerInstance(address, zooLock);
       self.putLastLocation(m);
@@ -265,9 +268,11 @@ public class MetadataTable extends org.a
       colq = key.getColumnQualifier(colq);
       
       // interpret the row id as a key extent
-      if (Constants.METADATA_DIRECTORY_COLUMN.equals(colf, colq)) datafile = new Text(val.toString());
+      if (Constants.METADATA_DIRECTORY_COLUMN.equals(colf, colq))
+        datafile = new Text(val.toString());
       
-      else if (Constants.METADATA_PREV_ROW_COLUMN.equals(colf, colq)) prevRow = new Value(val);
+      else if (Constants.METADATA_PREV_ROW_COLUMN.equals(colf, colq))
+        prevRow = new Value(val);
       
       if (datafile != null && prevRow != null) {
         ke = new KeyExtent(key.getRow(), prevRow);
@@ -365,7 +370,8 @@ public class MetadataTable extends org.a
     mdScanner.setRange(new Range(new Key(row), endKey));
     for (Entry<Key,Value> entry : mdScanner) {
       
-      if (!entry.getKey().getRow().equals(row)) break;
+      if (!entry.getKey().getRow().equals(row))
+        break;
       DataFileValue dfv = new DataFileValue(entry.getValue().get());
       sizes.put(entry.getKey().getColumnQualifier().toString(), dfv);
     }
@@ -450,10 +456,12 @@ public class MetadataTable extends org.a
     for (String scanFile : scanFiles)
       m.put(Constants.METADATA_SCANFILE_COLUMN_FAMILY, new Text(scanFile), new Value("".getBytes()));
     
-    if (size.getNumEntries() > 0) m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(path), new Value(size.encode()));
+    if (size.getNumEntries() > 0)
+      m.put(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(path), new Value(size.encode()));
     
     // remove the old location
-    if (lastLocation != null) lastLocation.clearLastLocation(m);
+    if (lastLocation != null)
+      lastLocation.clearLastLocation(m);
     TServerInstance self = getTServerInstance(address, zooLock);
     self.putLastLocation(m);
     
@@ -480,9 +488,9 @@ public class MetadataTable extends org.a
   private static KeyExtent fixSplit(Text table, Text metadataEntry, Text metadataPrevEndRow, Value oper, double splitRatio, TServerInstance tserver,
       AuthInfo credentials, String time, ZooLock lock) throws AccumuloException {
     if (metadataPrevEndRow == null)
-    // something is wrong, this should not happen... if a tablet is split, it will always have a
-    // prev end row....
-    throw new AccumuloException("Split tablet does not have prev end row, something is amiss, extent = " + metadataEntry);
+      // something is wrong, this should not happen... if a tablet is split, it will always have a
+      // prev end row....
+      throw new AccumuloException("Split tablet does not have prev end row, something is amiss, extent = " + metadataEntry);
     
     KeyExtent low = null;
     
@@ -620,7 +628,8 @@ public class MetadataTable extends org.a
       Key key = cell.getKey();
       String rowTable = new String(KeyExtent.tableOfMetadataRow(key.getRow()));
       
-      if (!rowTable.equals(table)) break;
+      if (!rowTable.equals(table))
+        break;
       
       if (m == null) {
         m = new Mutation(key.getRow());
@@ -635,7 +644,8 @@ public class MetadataTable extends org.a
       m.putDelete(key.getColumnFamily(), key.getColumnQualifier());
     }
     
-    if (m != null) bw.addMutation(m);
+    if (m != null)
+      bw.addMutation(m);
     
     bw.close();
   }
@@ -693,15 +703,16 @@ public class MetadataTable extends org.a
   }
   
   public static void addLogEntries(AuthInfo credentials, List<LogEntry> entries, ZooLock zooLock) {
-    if (entries.size() == 0) return;
+    if (entries.size() == 0)
+      return;
     // entries should be a complete log set, so we should only need to write the first entry
     LogEntry entry = entries.get(0);
     if (entry.extent.equals(Constants.ROOT_TABLET_EXTENT)) {
       String root = getZookeeperLogLocation();
       while (true) {
         try {
-          if (ZooLock.isLockHeld(ZooSession.getSession(), zooLock.getLockID())) ZooUtil.putPersistentData(root + "/" + entry.filename, entry.toBytes(),
-              NodeExistsPolicy.OVERWRITE);
+          if (ZooLock.isLockHeld(ZooSession.getSession(), zooLock.getLockID()))
+            ZooUtil.putPersistentData(root + "/" + entry.filename, entry.toBytes(), NodeExistsPolicy.OVERWRITE);
           break;
         } catch (KeeperException e) {
           log.error(e, e);
@@ -800,8 +811,10 @@ public class MetadataTable extends org.a
       @Override
       public int compare(LogEntry o1, LogEntry o2) {
         long diff = o1.timestamp - o2.timestamp;
-        if (diff < 0) return -1;
-        if (diff > 0) return 1;
+        if (diff < 0)
+          return -1;
+        if (diff > 0)
+          return 1;
         return 0;
       }
     });
@@ -876,7 +889,8 @@ public class MetadataTable extends org.a
         String root = getZookeeperLogLocation();
         while (true) {
           try {
-            if (ZooLock.isLockHeld(ZooSession.getSession(), zooLock.getLockID())) ZooUtil.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
+            if (ZooLock.isLockHeld(ZooSession.getSession(), zooLock.getLockID()))
+              ZooUtil.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
             break;
           } catch (Exception e) {
             log.error(e, e);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java Thu Oct 27 15:24:51 2011
@@ -52,10 +52,12 @@ public class RestoreZookeeper {
     public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
       if ("node".equals(name)) {
         String child = attributes.getValue("name");
-        if (child == null) throw new RuntimeException("name attribute not set");
+        if (child == null)
+          throw new RuntimeException("name attribute not set");
         String encoding = attributes.getValue("encoding");
         String value = attributes.getValue("value");
-        if (value == null) value = "";
+        if (value == null)
+          value = "";
         String path = cwd.lastElement() + "/" + child;
         create(path, value, encoding);
         cwd.push(path);
@@ -67,7 +69,8 @@ public class RestoreZookeeper {
           for (String part : root.split("/")) {
             if (!part.isEmpty()) {
               path += "/" + part;
-              if (!ZooUtil.exists(path)) create(path, "", "utf-8");
+              if (!ZooUtil.exists(path))
+                create(path, "", "utf-8");
             }
           }
         } catch (Exception ex) {
@@ -83,12 +86,14 @@ public class RestoreZookeeper {
     
     private void create(String path, String value, String encoding) {
       byte[] data = value.getBytes();
-      if ("base64".equals(encoding)) data = Base64.decodeBase64(value.getBytes());
+      if ("base64".equals(encoding))
+        data = Base64.decodeBase64(value.getBytes());
       try {
         try {
           ZooUtil.putPersistentData(zk, path, data, overwrite ? NodeExistsPolicy.OVERWRITE : NodeExistsPolicy.FAIL);
         } catch (KeeperException e) {
-          if (e.code().equals(KeeperException.Code.NODEEXISTS)) throw new RuntimeException(path + " exists.  Remove it first.");
+          if (e.code().equals(KeeperException.Code.NODEEXISTS))
+            throw new RuntimeException(path + " exists.  Remove it first.");
           throw e;
         }
       } catch (Exception e) {
@@ -112,7 +117,8 @@ public class RestoreZookeeper {
       in = new FileInputStream(args[1]);
     }
     for (String arg : args)
-      if (arg.equals("--overwrite")) overwrite = true;
+      if (arg.equals("--overwrite"))
+        overwrite = true;
     
     ZooKeeper zk = new ZooKeeper(server, timeout, new Watcher() {
       @Override

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java Thu Oct 27 15:24:51 2011
@@ -93,7 +93,8 @@ public class SendLogToChainsaw extends X
     
     // Create Date Filter
     if (null != start) {
-      if (end == null) end = new Date(System.currentTimeMillis());
+      if (end == null)
+        end = new Date(System.currentTimeMillis());
       dateFilter = new LongRange(start.getTime(), end.getTime());
     }
     
@@ -119,8 +120,10 @@ public class SendLogToChainsaw extends X
         try {
           out = convertLine(line, threadName);
           if (null != out) {
-            if (socket != null && socket.isConnected()) socket.getOutputStream().write(out.getBytes());
-            else System.err.println("Unable to send data to transport");
+            if (socket != null && socket.isConnected())
+              socket.getOutputStream().write(out.getBytes());
+            else
+              System.err.println("Unable to send data to transport");
           }
         } catch (Exception e) {
           System.out.println("Error processing line: " + line + ". Output was " + out);
@@ -131,7 +134,8 @@ public class SendLogToChainsaw extends X
       reader.close();
       fReader.close();
     }
-    if (socket != null && socket.isConnected()) socket.close();
+    if (socket != null && socket.isConnected())
+      socket.close();
   }
   
   private String convertLine(String line, String threadName) throws Exception {
@@ -152,7 +156,8 @@ public class SendLogToChainsaw extends X
       // Apply the regex filter if supplied
       if (null != lineFilter) {
         Matcher match = lineFilter.matcher(message);
-        if (!match.matches()) return null;
+        if (!match.matches())
+          return null;
       }
       // URL encode the message
       message = URLEncoder.encode(message, "UTF-8");
@@ -169,7 +174,8 @@ public class SendLogToChainsaw extends X
       }
       long ts = cal.getTimeInMillis();
       // If this event is not between the start and end dates, then skip it.
-      if (null != dateFilter && !dateFilter.containsLong(ts)) return null;
+      if (null != dateFilter && !dateFilter.containsLong(ts))
+        return null;
       Category c = Logger.getLogger(clazz);
       Level l = Level.toLevel(level);
       LoggingEvent event = new LoggingEvent(clazz, c, ts, l, message, threadName, (ThrowableInformation) null, (String) null, (LocationInfo) null,
@@ -246,7 +252,8 @@ public class SendLogToChainsaw extends X
     
     String logDir = cl.getOptionValue(o.getOption("d").getOpt());
     String fileNameFilter = null;
-    if (cl.hasOption(o.getOption("f").getOpt())) fileNameFilter = cl.getOptionValue(o.getOption("f").getOpt());
+    if (cl.hasOption(o.getOption("f").getOpt()))
+      fileNameFilter = cl.getOptionValue(o.getOption("f").getOpt());
     String chainsawHost = cl.getOptionValue(o.getOption("h").getOpt());
     int chainsawPort = 0;
     try {
@@ -265,9 +272,11 @@ public class SendLogToChainsaw extends X
       endDate = formatter.parse(cl.getOptionValue(o.getOption("e").getOpt()));
     }
     String msgFilter = null;
-    if (cl.hasOption(o.getOption("m").getOpt())) msgFilter = cl.getOptionValue(o.getOption("m").getOpt());
+    if (cl.hasOption(o.getOption("m").getOpt()))
+      msgFilter = cl.getOptionValue(o.getOption("m").getOpt());
     String levelFilter = null;
-    if (cl.hasOption(o.getOption("l").getOpt())) levelFilter = cl.getOptionValue(o.getOption("l").getOpt());
+    if (cl.hasOption(o.getOption("l").getOpt()))
+      levelFilter = cl.getOptionValue(o.getOption("l").getOpt());
     
     SendLogToChainsaw c = new SendLogToChainsaw(logDir, fileNameFilter, chainsawHost, chainsawPort, startDate, endDate, msgFilter, levelFilter);
     c.processLogFiles();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java Thu Oct 27 15:24:51 2011
@@ -27,7 +27,8 @@ import org.apache.zookeeper.KeeperExcept
 public class SystemPropUtil {
   public static boolean setSystemProperty(String property, String value) throws KeeperException, InterruptedException {
     Property p = Property.getPropertyByKey(property);
-    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidZooPropertyKey(property)) return false;
+    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidZooPropertyKey(property))
+      return false;
     
     // create the zk node for this property and set it's data to the specified value
     String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java Thu Oct 27 15:24:51 2011
@@ -88,11 +88,13 @@ public class TServerUtils {
       
       // Are we going to slide around, looking for an open port?
       int portsToSearch = 1;
-      if (portSearch) portsToSearch = 1000;
+      if (portSearch)
+        portsToSearch = 1000;
       
       for (int i = 0; i < portsToSearch; i++) {
         int port = portHint + i;
-        if (port > 65535) port = 1024 + port % (65535 - 1024);
+        if (port > 65535)
+          port = 1024 + port % (65535 - 1024);
         TServerTransport serverTransport;
         try {
           serverTransport = TServerUtils.openPort(port);
@@ -167,7 +169,8 @@ public class TServerUtils {
   // Boilerplate start-up for a TServer
   public static TServer startTServer(TProcessor processor, TServerTransport serverTransport, String serverName, String threadName, int numThreads) {
     TThreadPoolServer.Options options = new TThreadPoolServer.Options();
-    if (numThreads > 0) options.maxWorkerThreads = numThreads;
+    if (numThreads > 0)
+      options.maxWorkerThreads = numThreads;
     processor = new TServerUtils.TimedProcessor(processor, serverName, threadName);
     final TServer tserver = new TThreadPoolServer(new ClientInfoProcessorFactory(processor), serverTransport, ThriftUtil.transportFactory(),
         ThriftUtil.transportFactory(), ThriftUtil.inputProtocolFactory(), ThriftUtil.outputProtocolFactory(), options);
@@ -188,7 +191,8 @@ public class TServerUtils {
   
   // Existing connections will keep our thread running: reach in with reflection and insist that they shutdown.
   public static void stopTServer(TServer s) {
-    if (s == null) return;
+    if (s == null)
+      return;
     s.stop();
     try {
       Field f = s.getClass().getDeclaredField("executorService_");

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java Thu Oct 27 15:24:51 2011
@@ -27,7 +27,8 @@ import org.apache.zookeeper.KeeperExcept
 public class TablePropUtil {
   public static boolean setTableProperty(String tableId, String property, String value) throws KeeperException, InterruptedException {
     Property p = Property.getPropertyByKey(property);
-    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidTablePropertyKey(property)) return false;
+    if ((p != null && !p.getType().isValidFormat(value)) || !Property.isValidTablePropertyKey(property))
+      return false;
     
     // create the zk node for per-table properties for this table if it doesn't already exist
     String zkTablePath = getTablePath(tableId);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java Thu Oct 27 15:24:51 2011
@@ -147,7 +147,8 @@ public class TabletIterator implements I
   @Override
   public Map<Key,Value> next() {
     
-    if (currentTabletKeys == null || currentTabletKeys.size() == 0) throw new NoSuchElementException();
+    if (currentTabletKeys == null || currentTabletKeys.size() == 0)
+      throw new NoSuchElementException();
     
     Map<Key,Value> tmp = currentTabletKeys;
     currentTabletKeys = null;

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java Thu Oct 27 15:24:51 2011
@@ -95,8 +95,8 @@ public class VerifyTabletAssignments {
     try {
       cl = new BasicParser().parse(opts, args);
       
-      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2) throw new MissingArgumentException(
-          zooKeeperInstance);
+      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2)
+        throw new MissingArgumentException(zooKeeperInstance);
       
       user = cl.getOptionValue(usernameOption.getOpt());
       passw = cl.getOptionValue(passwOption.getOpt());
@@ -108,13 +108,15 @@ public class VerifyTabletAssignments {
         instance = HdfsZooInstance.getInstance();
       }
       
-      if (passw == null) passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
+      if (passw == null)
+        passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
       if (passw == null) {
         reader.printNewline();
         return;
       } // user canceled
       
-      if (cl.getArgs().length != 0) throw new ParseException("Unrecognized arguments: " + cl.getArgList());
+      if (cl.getArgs().length != 0)
+        throw new ParseException("Unrecognized arguments: " + cl.getArgList());
       
     } catch (ParseException e) {
       PrintWriter pw = new PrintWriter(System.err);
@@ -133,8 +135,10 @@ public class VerifyTabletAssignments {
   private static void checkTable(final String user, final byte[] pass, String table, HashSet<KeyExtent> check, boolean verbose) throws AccumuloException,
       AccumuloSecurityException, TableNotFoundException, InterruptedException {
     
-    if (check == null) System.out.println("Checking table " + table);
-    else System.out.println("Checking table " + table + " again, failures " + check.size());
+    if (check == null)
+      System.out.println("Checking table " + table);
+    else
+      System.out.println("Checking table " + table + " again, failures " + check.size());
     
     Map<KeyExtent,String> locations = new TreeMap<KeyExtent,String>();
     SortedSet<KeyExtent> tablets = new TreeSet<KeyExtent>();
@@ -145,8 +149,10 @@ public class VerifyTabletAssignments {
     final HashSet<KeyExtent> failures = new HashSet<KeyExtent>();
     
     for (KeyExtent keyExtent : tablets)
-      if (!locations.containsKey(keyExtent)) System.out.println(" Tablet " + keyExtent + " has no location");
-      else if (verbose) System.out.println(" Tablet " + keyExtent + " is located at " + locations.get(keyExtent));
+      if (!locations.containsKey(keyExtent))
+        System.out.println(" Tablet " + keyExtent + " has no location");
+      else if (verbose)
+        System.out.println(" Tablet " + keyExtent + " is located at " + locations.get(keyExtent));
     
     Map<String,List<KeyExtent>> extentsPerServer = new TreeMap<String,List<KeyExtent>>();
     
@@ -157,7 +163,8 @@ public class VerifyTabletAssignments {
         extentsPerServer.put(entry.getValue(), extentList);
       }
       
-      if (check == null || check.contains(entry.getKey())) extentList.add(entry.getKey());
+      if (check == null || check.contains(entry.getKey()))
+        extentList.add(entry.getKey());
     }
     
     ExecutorService tp = Executors.newFixedThreadPool(20);
@@ -185,7 +192,8 @@ public class VerifyTabletAssignments {
     
     while (!tp.awaitTermination(1, TimeUnit.HOURS)) {}
     
-    if (failures.size() > 0) checkTable(user, pass, table, failures, verbose);
+    if (failures.size() > 0)
+      checkTable(user, pass, table, failures, verbose);
   }
   
   private static void checkFailures(String server, HashSet<KeyExtent> failures, MultiScanResult scanResult) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java Thu Oct 27 15:24:51 2011
@@ -34,7 +34,8 @@ public class ZooZap {
    * @param args
    */
   private static void message(String msg) {
-    if (verbose) System.out.println(msg);
+    if (verbose)
+      System.out.println(msg);
   }
   
   public static void main(String[] args) {
@@ -82,7 +83,8 @@ public class ZooZap {
         for (String child : children) {
           message("Deleting " + tserversPath + "/" + child + " from zookeeper");
           
-          if (zapMaster) ZooUtil.recursiveDelete(tserversPath + "/" + child, NodeMissingPolicy.SKIP);
+          if (zapMaster)
+            ZooUtil.recursiveDelete(tserversPath + "/" + child, NodeMissingPolicy.SKIP);
           else {
             String path = tserversPath + "/" + child;
             if (zk.getChildren(path, false).size() > 0) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/getSlaves.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/getSlaves.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/getSlaves.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/getSlaves.java Thu Oct 27 15:24:51 2011
@@ -41,7 +41,8 @@ public class getSlaves {
       all.append(new String(buffer, 0, n));
     for (String slave : all.toString().split("\n")) {
       slave = slave.trim();
-      if (slave.length() > 0 && slave.indexOf("#") < 0) result.add(slave);
+      if (slave.length() > 0 && slave.indexOf("#") < 0)
+        result.add(slave);
     }
     return result;
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/BaseRelativeTime.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/BaseRelativeTime.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/BaseRelativeTime.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/BaseRelativeTime.java Thu Oct 27 15:24:51 2011
@@ -41,7 +41,8 @@ public class BaseRelativeTime implements
   synchronized public long currentTime() {
     long localNow = local.currentTime();
     long result = localNow + diff;
-    if (result < lastReportedTime) return lastReportedTime;
+    if (result < lastReportedTime)
+      return lastReportedTime;
     lastReportedTime = result;
     return result;
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java Thu Oct 27 15:24:51 2011
@@ -30,7 +30,8 @@ public class SimpleTimer {
   private Timer timer;
   
   public static synchronized SimpleTimer getInstance() {
-    if (instance == null) instance = new SimpleTimer();
+    if (instance == null)
+      instance = new SimpleTimer();
     return instance;
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/logger/LogFileTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/logger/LogFileTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/logger/LogFileTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/logger/LogFileTest.java Thu Oct 27 15:24:51 2011
@@ -68,12 +68,13 @@ public class LogFileTest {
   }
   
   static void assertEqualsMutations(Mutation[] a, Mutation[] b) {
-    if (a.length == b.length) for (int i = 0; i < a.length; i++) {
-      assertEquals(a[i], b[i]);
-      Collection<ColumnUpdate> au = a[i].getUpdates();
-      Collection<ColumnUpdate> bu = a[i].getUpdates();
-      assertEquals(au, bu);
-    }
+    if (a.length == b.length)
+      for (int i = 0; i < a.length; i++) {
+        assertEquals(a[i], b[i]);
+        Collection<ColumnUpdate> au = a[i].getUpdates();
+        Collection<ColumnUpdate> bu = a[i].getUpdates();
+        assertEquals(au, bu);
+      }
   }
   
   @Test

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java Thu Oct 27 15:24:51 2011
@@ -58,7 +58,8 @@ public class DefaultLoadBalancerTest {
       for (KeyExtent extent : extents) {
         String table = extent.getTableId().toString();
         TableInfo info = result.tableMap.get(table);
-        if (info == null) result.tableMap.put(table, info = new TableInfo());
+        if (info == null)
+          result.tableMap.put(table, info = new TableInfo());
         info.onlineTablets++;
         info.recs = info.onlineTablets;
         info.ingestRate = 123.;
@@ -191,9 +192,11 @@ public class DefaultLoadBalancerTest {
     while (true) {
       List<TabletMigration> migrationsOut = new ArrayList<TabletMigration>();
       balancer.balance(getAssignments(servers), migrations, migrationsOut);
-      if (migrationsOut.size() == 0) break;
+      if (migrationsOut.size() == 0)
+        break;
       for (TabletMigration migration : migrationsOut) {
-        if (servers.get(migration.oldServer).extents.remove(migration.tablet)) moved++;
+        if (servers.get(migration.oldServer).extents.remove(migration.tablet))
+          moved++;
         servers.get(migration.newServer).extents.add(migration.tablet);
       }
     }
@@ -233,9 +236,11 @@ public class DefaultLoadBalancerTest {
     while (true) {
       List<TabletMigration> migrationsOut = new ArrayList<TabletMigration>();
       balancer.balance(getAssignments(servers), migrations, migrationsOut);
-      if (migrationsOut.size() == 0) break;
+      if (migrationsOut.size() == 0)
+        break;
       for (TabletMigration migration : migrationsOut) {
-        if (servers.get(migration.oldServer).extents.remove(migration.tablet)) moved++;
+        if (servers.get(migration.oldServer).extents.remove(migration.tablet))
+          moved++;
         servers.get(migration.newServer).extents.add(migration.tablet);
       }
     }
@@ -248,15 +253,18 @@ public class DefaultLoadBalancerTest {
     int average = metadataTable.size() / servers.size();
     for (FakeTServer server : servers.values()) {
       int diff = server.extents.size() - average;
-      if (diff < 0) fail("average number of tablets is " + average + " but a server has " + server.extents.size());
-      if (diff > 1) fail("average number of tablets is " + average + " but a server has " + server.extents.size());
+      if (diff < 0)
+        fail("average number of tablets is " + average + " but a server has " + server.extents.size());
+      if (diff > 1)
+        fail("average number of tablets is " + average + " but a server has " + server.extents.size());
     }
     
     for (FakeTServer server : servers.values()) {
       Map<String,Integer> counts = new HashMap<String,Integer>();
       for (KeyExtent extent : server.extents) {
         String t = extent.getTableId().toString();
-        if (counts.get(t) == null) counts.put(t, 0);
+        if (counts.get(t) == null)
+          counts.put(t, 0);
         counts.put(t, counts.get(t) + 1);
       }
       for (Entry<String,Integer> entry : counts.entrySet()) {
@@ -270,7 +278,8 @@ public class DefaultLoadBalancerTest {
   }
   
   private static Text toText(String value) {
-    if (value != null) return new Text(value);
+    if (value != null)
+      return new Text(value);
     return null;
   }
   

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancerTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancerTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancerTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/balancer/SimpleLoggerBalancerTest.java Thu Oct 27 15:24:51 2011
@@ -74,7 +74,8 @@ public class SimpleLoggerBalancerTest {
       if (adjustments != null) {
         Set<String> newLoggers = new HashSet<String>(adjustments);
         for (String logger : user.loggers) {
-          if (newLoggers.size() >= numberOfLoggers) break;
+          if (newLoggers.size() >= numberOfLoggers)
+            break;
           newLoggers.add(logger);
         }
         user.loggers = newLoggers;
@@ -83,7 +84,8 @@ public class SimpleLoggerBalancerTest {
     Map<String,Integer> result = new HashMap<String,Integer>();
     for (LoggerUser server : tservers) {
       for (String logger : server.getLoggers()) {
-        if (!result.containsKey(logger)) result.put(logger, 0);
+        if (!result.containsKey(logger))
+          result.put(logger, 0);
         result.put(logger, result.get(logger) + 1);
       }
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/master/state/RootTabletStateStoreTest.java Thu Oct 27 15:24:51 2011
@@ -52,7 +52,8 @@ public class RootTabletStateStoreTest {
     
     Node find(String name) {
       for (Node node : children)
-        if (node.name.equals(name)) return node;
+        if (node.name.equals(name))
+          return node;
       return null;
     }
   };
@@ -62,9 +63,11 @@ public class RootTabletStateStoreTest {
     Node root = new Node("/");
     
     private Node recurse(Node root, String[] path, int depth) {
-      if (depth == path.length) return root;
+      if (depth == path.length)
+        return root;
       Node child = root.find(path[depth]);
-      if (child == null) return null;
+      if (child == null)
+        return null;
       return recurse(child, path, depth + 1);
     }
     
@@ -76,7 +79,8 @@ public class RootTabletStateStoreTest {
     @Override
     public List<String> getChildren(String path) throws DistributedStoreException {
       Node node = navigate(path);
-      if (node == null) return Collections.emptyList();
+      if (node == null)
+        return Collections.emptyList();
       List<String> children = new ArrayList<String>(node.children.size());
       for (Node child : node.children)
         children.add(child.name);
@@ -94,7 +98,8 @@ public class RootTabletStateStoreTest {
     }
     
     private Node recurseCreate(Node root, String[] path, int index) {
-      if (path.length == index) return root;
+      if (path.length == index)
+        return root;
       Node node = root.find(path[index]);
       if (node == null) {
         node = new Node(path[index]);
@@ -108,15 +113,18 @@ public class RootTabletStateStoreTest {
       String[] parts = path.split("/");
       String[] parentPath = Arrays.copyOf(parts, parts.length - 1);
       Node parent = recurse(root, parentPath, 1);
-      if (parent == null) return;
+      if (parent == null)
+        return;
       Node child = parent.find(parts[parts.length - 1]);
-      if (child != null) parent.children.remove(child);
+      if (child != null)
+        parent.children.remove(child);
     }
     
     @Override
     public byte[] get(String path) throws DistributedStoreException {
       Node node = navigate(path);
-      if (node != null) return node.value;
+      if (node != null)
+        return node.value;
       return null;
     }
   }

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/tabletserver/log/MultiReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/tabletserver/log/MultiReaderTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/tabletserver/log/MultiReaderTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/tabletserver/log/MultiReaderTest.java Thu Oct 27 15:24:51 2011
@@ -55,7 +55,8 @@ public class MultiReaderTest {
     writer.close();
     writer = new Writer(conf, fs, "manyMaps/even", IntWritable.class, BytesWritable.class);
     for (int i = 0; i < 1000; i += 2) {
-      if (i == 10) continue;
+      if (i == 10)
+        continue;
       writer.append(new IntWritable(i), value);
     }
     writer.close();
@@ -63,7 +64,8 @@ public class MultiReaderTest {
   
   @After
   public void tearDown() throws Exception {
-    if (fs != null) fs.delete(new Path("manyMaps"), true);
+    if (fs != null)
+      fs.delete(new Path("manyMaps"), true);
   }
   
   private void scan(MultiReader reader, int start) throws IOException {
@@ -71,7 +73,8 @@ public class MultiReaderTest {
     BytesWritable value = new BytesWritable();
     
     for (int i = start + 1; i < 1000; i++) {
-      if (i == 10) continue;
+      if (i == 10)
+        continue;
       assertTrue(reader.next(key, value));
       assertEquals(i, key.get());
     }
@@ -94,7 +97,8 @@ public class MultiReaderTest {
     BytesWritable value = new BytesWritable();
     
     for (int i = 0; i < 1000; i++) {
-      if (i == 10) continue;
+      if (i == 10)
+        continue;
       assertTrue(reader.next(key, value));
       assertEquals(i, key.get());
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/test/randomwalk/FrameworkTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/test/randomwalk/FrameworkTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/test/randomwalk/FrameworkTest.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/test/java/org/apache/accumulo/server/test/randomwalk/FrameworkTest.java Thu Oct 27 15:24:51 2011
@@ -72,7 +72,8 @@ public class FrameworkTest extends TestC
     
     // don't run test if accumulo home is not set
     String acuHome = System.getenv("ACCUMULO_HOME");
-    if (acuHome == null) return;
+    if (acuHome == null)
+      return;
     
     String confDir = acuHome + "/test/system/randomwalk/conf/";
     Framework.setConfigDir(confDir);
@@ -88,7 +89,8 @@ public class FrameworkTest extends TestC
     
     // don't run test if accumulo home is not set
     String acuHome = System.getenv("ACCUMULO_HOME");
-    if (acuHome == null) return;
+    if (acuHome == null)
+      return;
     
     Framework framework = Framework.getInstance();
     String confDir = acuHome + "/test/system/randomwalk/conf/";

Modified: incubator/accumulo/branches/1.3/src/start/src/main/java/org/apache/accumulo/start/TestMain.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/start/src/main/java/org/apache/accumulo/start/TestMain.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/start/src/main/java/org/apache/accumulo/start/TestMain.java (original)
+++ incubator/accumulo/branches/1.3/src/start/src/main/java/org/apache/accumulo/start/TestMain.java Thu Oct 27 15:24:51 2011
@@ -19,8 +19,10 @@ package org.apache.accumulo.start;
 public class TestMain {
   public static void main(String[] args) {
     if (args.length > 0) {
-      if (args[0].equals("success")) System.exit(0);
-      if (args[0].equals("throw")) throw new RuntimeException("This is an exception");
+      if (args[0].equals("success"))
+        System.exit(0);
+      if (args[0].equals("throw"))
+        throw new RuntimeException("This is an exception");
     }
     System.exit(-1);
   }



Mime
View raw message