incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [25/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/core/src/test/java/org/apache/accumulo/core/iterators/IntersectingIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/IntersectingIteratorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/IntersectingIteratorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/IntersectingIteratorTest.java Thu Oct 27 15:24:51 2011
@@ -72,8 +72,10 @@ public class IntersectingIteratorTest ex
     
     for (int i = 0; i < columnFamilies.length; i++) {
       negateMask[i] = false;
-      if (negatedColumns.length > 0) for (Text ng : negatedColumns)
-        if (columnFamilies[i].equals(ng)) negateMask[i] = true;
+      if (negatedColumns.length > 0)
+        for (Text ng : negatedColumns)
+          if (columnFamilies[i].equals(ng))
+            negateMask[i] = true;
     }
     for (int i = 0; i < numRows; i++) {
       Text row = new Text(String.format("%06d", i));
@@ -84,9 +86,11 @@ public class IntersectingIteratorTest ex
           if (r.nextFloat() < hitRatio) {
             Key k = new Key(row, columnFamilies[j], doc);
             map.put(k, v);
-            if (negateMask[j]) docHits = false;
+            if (negateMask[j])
+              docHits = false;
           } else {
-            if (!negateMask[j]) docHits = false;
+            if (!negateMask[j])
+              docHits = false;
           }
         }
         if (docHits) {

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/MultiIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/MultiIteratorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/MultiIteratorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/MultiIteratorTest.java Thu Oct 27 15:24:51 2011
@@ -65,14 +65,17 @@ public class MultiIteratorTest extends T
     }
     
     MultiIterator mi;
-    if (endRow == null && prevEndRow == null) mi = new MultiIterator(iters, init);
+    if (endRow == null && prevEndRow == null)
+      mi = new MultiIterator(iters, init);
     else {
       Range range = new Range(prevEndRow, false, endRow, true);
-      if (init) for (SortedKeyValueIterator<Key,Value> iter : iters)
-        iter.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
+      if (init)
+        for (SortedKeyValueIterator<Key,Value> iter : iters)
+          iter.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
       mi = new MultiIterator(iters, range);
       
-      if (init) mi.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
+      if (init)
+        mi.seek(range, LocalityGroupUtil.EMPTY_CF_SET, false);
     }
     
     if (seekKey != null) {
@@ -81,14 +84,18 @@ public class MultiIteratorTest extends T
     
     int i = start;
     while (mi.hasTop()) {
-      if (incrRow) assertEquals(nk(i, 0), mi.getTopKey());
-      else assertEquals(nk(0, i), mi.getTopKey());
+      if (incrRow)
+        assertEquals(nk(i, 0), mi.getTopKey());
+      else
+        assertEquals(nk(0, i), mi.getTopKey());
       
       assertEquals("v" + i, mi.getTopValue().toString());
       
       mi.next();
-      if (incrRow) i++;
-      else i--;
+      if (incrRow)
+        i++;
+      else
+        i--;
     }
     
     assertEquals("start=" + start + " end=" + end + " seekKey=" + seekKey + " endRow=" + endRow + " prevEndRow=" + prevEndRow + " init=" + init + " incrRow="
@@ -142,8 +149,10 @@ public class MultiIteratorTest extends T
     List<TreeMap<Key,Value>> tmpList = new ArrayList<TreeMap<Key,Value>>(2);
     
     for (int i = 0; i < 8; i++) {
-      if (i % 2 == 0) nkv(tm1, 0, i, false, "v" + i);
-      else nkv(tm2, 0, i, false, "v" + i);
+      if (i % 2 == 0)
+        nkv(tm1, 0, i, false, "v" + i);
+      else
+        nkv(tm2, 0, i, false, "v" + i);
     }
     tmpList.add(tm1);
     tmpList.add(tm2);
@@ -197,8 +206,10 @@ public class MultiIteratorTest extends T
     List<TreeMap<Key,Value>> tmpList = new ArrayList<TreeMap<Key,Value>>(2);
     
     for (int i = 0; i < 8; i++) {
-      if (i % 2 == 0) nkv(tm1, i, 0, false, "v" + i);
-      else nkv(tm2, i, 0, false, "v" + i);
+      if (i % 2 == 0)
+        nkv(tm1, i, 0, false, "v" + i);
+      else
+        nkv(tm2, i, 0, false, "v" + i);
     }
     
     tmpList.add(tm1);
@@ -224,9 +235,11 @@ public class MultiIteratorTest extends T
           
           int start = Math.max(per + 1, seek);
           
-          if (start > er) end = start;
+          if (start > er)
+            end = start;
           
-          if (per >= 8) end = start;
+          if (per >= 8)
+            end = start;
           
           int noSeekStart = Math.max(0, per + 1);
           

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/SourceSwitchingIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/SourceSwitchingIteratorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/SourceSwitchingIteratorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/SourceSwitchingIteratorTest.java Thu Oct 27 15:24:51 2011
@@ -51,7 +51,8 @@ public class SourceSwitchingIteratorTest
     assertTrue(rdi.hasTop());
     assertEquals(nk(row, cf, cq, time), rdi.getTopKey());
     assertEquals(val, rdi.getTopValue().toString());
-    if (callNext) rdi.next();
+    if (callNext)
+      rdi.next();
   }
   
   class TestDataSource implements DataSource {
@@ -94,7 +95,8 @@ public class SourceSwitchingIteratorTest
       this.next = next;
       
       for (TestDataSource tds : copies) {
-        if (tds != this) tds.next = new TestDataSource(next.iter.deepCopy(null), next.copies);
+        if (tds != this)
+          tds.next = new TestDataSource(next.iter.deepCopy(null), next.copies);
       }
     }
     

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchScanner.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchScanner.java Thu Oct 27 15:24:51 2011
@@ -89,9 +89,11 @@ public class RandomBatchScanner {
   private static void printRowsNotFound(HashMap<Text,Boolean> expectedRows) {
     int count = 0;
     for (Entry<Text,Boolean> entry : expectedRows.entrySet())
-      if (!entry.getValue()) count++;
+      if (!entry.getValue())
+        count++;
     
-    if (count > 0) log.warn("Did not find " + count + " rows");
+    if (count > 0)
+      log.warn("Did not find " + count + " rows");
   }
   
   static void doRandomQueries(int num, long min, long max, int evs, Random r, BatchScanner tsbr) {
@@ -159,8 +161,10 @@ public class RandomBatchScanner {
     BatchScanner tsbr = connector.createBatchScanner(table, new Authorizations(visibility), numThreads);
     
     Random r;
-    if (seed == null) r = new Random();
-    else r = new Random(Long.parseLong(seed));
+    if (seed == null)
+      r = new Random();
+    else
+      r = new Random(Long.parseLong(seed));
     
     // do one cold
     doRandomQueries(num, min, max, expectedValueSize, r, tsbr);
@@ -169,8 +173,10 @@ public class RandomBatchScanner {
     System.gc();
     System.gc();
     
-    if (seed == null) r = new Random();
-    else r = new Random(Long.parseLong(seed));
+    if (seed == null)
+      r = new Random();
+    else
+      r = new Random(Long.parseLong(seed));
     
     // do one hot (connections already established, metadata table cached)
     doRandomQueries(num, min, max, expectedValueSize, r, tsbr);

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchWriter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchWriter.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RandomBatchWriter.java Thu Oct 27 15:24:51 2011
@@ -101,7 +101,8 @@ public class RandomBatchWriter {
     // logger.setLevel(Level.TRACE);
     
     Random r;
-    if (seed == null) r = new Random();
+    if (seed == null)
+      r = new Random();
     else {
       r = new Random(Long.parseLong(seed));
     }

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/ReadWriteExample.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/ReadWriteExample.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/ReadWriteExample.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/ReadWriteExample.java Thu Oct 27 15:24:51 2011
@@ -88,10 +88,12 @@ public class ReadWriteExample {
     
     // parse command line
     cl = new BasicParser().parse(opts, args);
-    if (cl.getArgs().length != 0) throw new ParseException("unrecognized options " + cl.getArgList());
+    if (cl.getArgs().length != 0)
+      throw new ParseException("unrecognized options " + cl.getArgList());
     
     // optionally enable debugging
-    if (hasOpt(debugOpt)) Logger.getLogger(Constants.CORE_PACKAGE_NAME).setLevel(Level.TRACE);
+    if (hasOpt(debugOpt))
+      Logger.getLogger(Constants.CORE_PACKAGE_NAME).setLevel(Level.TRACE);
     
     Instance inst = new ZooKeeperInstance(getOpt(instanceOpt, DEFAULT_INSTANCE_NAME), getOpt(zooKeepersOpt, DEFAULT_ZOOKEEPERS));
     conn = inst.getConnector(getRequiredOpt(usernameOpt), getRequiredOpt(passwordOpt).getBytes());
@@ -139,10 +141,12 @@ public class ReadWriteExample {
     }
     
     // create entries
-    if (hasOpt(createEntriesOpt)) createEntries(false);
+    if (hasOpt(createEntriesOpt))
+      createEntries(false);
     
     // delete entries
-    if (hasOpt(deleteEntriesOpt)) createEntries(true);
+    if (hasOpt(deleteEntriesOpt))
+      createEntries(true);
     
     // read entries
     if (hasOpt(readEntriesOpt)) {
@@ -156,7 +160,8 @@ public class ReadWriteExample {
     }
     
     // delete table
-    if (hasOpt(deletetableOpt)) conn.tableOperations().delete(getOpt(tableNameOpt, DEFAULT_TABLE_NAME));
+    if (hasOpt(deletetableOpt))
+      conn.tableOperations().delete(getOpt(tableNameOpt, DEFAULT_TABLE_NAME));
   }
   
   private void createEntries(boolean delete) throws AccumuloException, TableNotFoundException, MutationsRejectedException {

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RowOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RowOperations.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RowOperations.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/client/RowOperations.java Thu Oct 27 15:24:51 2011
@@ -180,7 +180,8 @@ public class RowOperations {
     // iterate through the keys
     for (Entry<Key,Value> entry : scanner) {
       // create a mutation for the row
-      if (deleter == null) deleter = new Mutation(entry.getKey().getRow());
+      if (deleter == null)
+        deleter = new Mutation(entry.getKey().getRow());
       // the remove function adds the key with the delete flag set to true
       deleter.putDelete(entry.getKey().getColumnFamily(), entry.getKey().getColumnQualifier());
     }

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/AlphaNumKeyConstraint.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/AlphaNumKeyConstraint.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/AlphaNumKeyConstraint.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/AlphaNumKeyConstraint.java Thu Oct 27 15:24:51 2011
@@ -40,7 +40,8 @@ public class AlphaNumKeyConstraint imple
   private boolean isAlphaNum(byte bytes[]) {
     for (byte b : bytes) {
       boolean ok = ((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || (b >= '0' && b <= '9'));
-      if (!ok) return false;
+      if (!ok)
+        return false;
     }
     
     return true;
@@ -60,13 +61,16 @@ public class AlphaNumKeyConstraint imple
   public List<Short> check(Mutation mutation) {
     List<Short> violations = null;
     
-    if (!isAlphaNum(mutation.getRow())) violations = addViolation(violations, NON_ALPHA_NUM_ROW);
+    if (!isAlphaNum(mutation.getRow()))
+      violations = addViolation(violations, NON_ALPHA_NUM_ROW);
     
     Collection<ColumnUpdate> updates = mutation.getUpdates();
     for (ColumnUpdate columnUpdate : updates) {
-      if (!isAlphaNum(columnUpdate.getColumnFamily())) violations = addViolation(violations, NON_ALPHA_NUM_COLF);
+      if (!isAlphaNum(columnUpdate.getColumnFamily()))
+        violations = addViolation(violations, NON_ALPHA_NUM_COLF);
       
-      if (!isAlphaNum(columnUpdate.getColumnQualifier())) violations = addViolation(violations, NON_ALPHA_NUM_COLQ);
+      if (!isAlphaNum(columnUpdate.getColumnQualifier()))
+        violations = addViolation(violations, NON_ALPHA_NUM_COLQ);
     }
     
     return violations;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/NumericValueConstraint.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/NumericValueConstraint.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/NumericValueConstraint.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/constraints/NumericValueConstraint.java Thu Oct 27 15:24:51 2011
@@ -31,7 +31,8 @@ public class NumericValueConstraint impl
   private boolean isNumeric(byte bytes[]) {
     for (byte b : bytes) {
       boolean ok = (b >= '0' && b <= '9');
-      if (!ok) return false;
+      if (!ok)
+        return false;
     }
     
     return true;
@@ -54,7 +55,8 @@ public class NumericValueConstraint impl
     Collection<ColumnUpdate> updates = mutation.getUpdates();
     
     for (ColumnUpdate columnUpdate : updates) {
-      if (!isNumeric(columnUpdate.getValue())) violations = addViolation(violations, NON_NUMERIC_VALUE);
+      if (!isNumeric(columnUpdate.getValue()))
+        violations = addViolation(violations, NON_NUMERIC_VALUE);
     }
     
     return violations;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCount.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCount.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCount.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCount.java Thu Oct 27 15:24:51 2011
@@ -89,15 +89,18 @@ public class FileCount {
   
   private int findMaxDepth(Scanner scanner, int min, int mid, int max) {
     // check to see if the mid point exist
-    if (max < min) return -1;
+    if (max < min)
+      return -1;
     
     scanner.setRange(new Range(String.format("%03d", mid), true, String.format("%03d", mid + 1), false));
     
     if (scanner.iterator().hasNext()) {
       // this depth exist, check to see if a larger depth exist
       int ret = findMaxDepth(scanner, mid + 1, max);
-      if (ret == -1) return mid; // this must the max
-      else return ret;
+      if (ret == -1)
+        return mid; // this must the max
+      else
+        return ret;
     } else {
       // this depth does not exist, look lower
       return findMaxDepth(scanner, min, mid - 1);
@@ -120,14 +123,16 @@ public class FileCount {
     Key key = entry.getKey();
     Text currentRow = key.getRow();
     
-    if (key.compareColumnQualifier(QueryUtil.COUNTS_COLQ) == 0) cv.set(entry.getValue());
+    if (key.compareColumnQualifier(QueryUtil.COUNTS_COLQ) == 0)
+      cv.set(entry.getValue());
     
     while (iterator.hasNext()) {
       entry = iterator.next();
       entriesScanned++;
       key = entry.getKey();
       
-      if (key.compareRow(currentRow) != 0) return entry;
+      if (key.compareRow(currentRow) != 0)
+        return entry;
       
       if (key.compareColumnFamily(QueryUtil.DIR_COLF) == 0 && key.compareColumnQualifier(QueryUtil.COUNTS_COLQ) == 0) {
         cv.set(entry.getValue());
@@ -147,7 +152,8 @@ public class FileCount {
       entriesScanned++;
       key = entry.getKey();
       
-      if (key.compareRow(currentRow) != 0) return entry;
+      if (key.compareRow(currentRow) != 0)
+        return entry;
     }
     
     return null;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/FileCountMR.java Thu Oct 27 15:24:51 2011
@@ -44,8 +44,10 @@ public class FileCountMR extends Configu
     String prefix;
     
     private void incrementCounts(Key k) {
-      if (k.getColumnFamily().equals(QueryUtil.DIR_COLF)) dirCount++;
-      else fileCount++;
+      if (k.getColumnFamily().equals(QueryUtil.DIR_COLF))
+        dirCount++;
+      else
+        fileCount++;
     }
     
     // store last row found and its prefix, reset counts, and increment
@@ -53,7 +55,8 @@ public class FileCountMR extends Configu
       lastRowFound = k.getRow();
       prefix = lastRowFound.toString();
       int slashIndex = prefix.lastIndexOf("/");
-      if (slashIndex >= 0) prefix = prefix.substring(0, slashIndex + 1);
+      if (slashIndex >= 0)
+        prefix = prefix.substring(0, slashIndex + 1);
       dirCount = 0;
       fileCount = 0;
       incrementCounts(k);
@@ -83,7 +86,8 @@ public class FileCountMR extends Configu
     
     @Override
     protected void cleanup(Context context) throws IOException, InterruptedException {
-      if (lastRowFound == null) return;
+      if (lastRowFound == null)
+        return;
       String lrf = lastRowFound.toString().substring(3);
       int slashIndex;
       int parentCount = 0;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Ingest.java Thu Oct 27 15:24:51 2011
@@ -41,8 +41,10 @@ public class Ingest {
     }
     Mutation m = new Mutation(QueryUtil.getRow(path));
     Text colf = null;
-    if (src.isDirectory()) colf = QueryUtil.DIR_COLF;
-    else colf = new Text(LongSummation.longToBytes(Long.MAX_VALUE - src.lastModified()));
+    if (src.isDirectory())
+      colf = QueryUtil.DIR_COLF;
+    else
+      colf = new Text(LongSummation.longToBytes(Long.MAX_VALUE - src.lastModified()));
     m.put(colf, new Text("length"), cv, new Value(Long.toString(src.length()).getBytes()));
     m.put(colf, new Text("hidden"), cv, new Value(Boolean.toString(src.isHidden()).getBytes()));
     m.put(colf, new Text("exec"), cv, new Value(Boolean.toString(src.canExecute()).getBytes()));
@@ -70,7 +72,8 @@ public class Ingest {
     // recurse into subdirectories
     if (src.isDirectory()) {
       File[] files = src.listFiles();
-      if (files == null) return;
+      if (files == null)
+        return;
       for (File child : files) {
         recurse(child, cv, main, index);
       }
@@ -92,8 +95,10 @@ public class Ingest {
     ColumnVisibility colvis = new ColumnVisibility(args[6]);
     
     Connector conn = new ZooKeeperInstance(instance, zooKeepers).getConnector(user, pass.getBytes());
-    if (!conn.tableOperations().exists(table)) conn.tableOperations().create(table);
-    if (!conn.tableOperations().exists(indexTable)) conn.tableOperations().create(indexTable);
+    if (!conn.tableOperations().exists(table))
+      conn.tableOperations().create(table);
+    if (!conn.tableOperations().exists(indexTable))
+      conn.tableOperations().create(indexTable);
     BatchWriter mainBW = conn.createBatchWriter(table, 50000000, 300000l, 4);
     BatchWriter indexBW = conn.createBatchWriter(indexTable, 50000000, 300000l, 4);
     for (int i = 7; i < args.length; i++) {

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/QueryUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/QueryUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/QueryUtil.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/QueryUtil.java Thu Oct 27 15:24:51 2011
@@ -68,7 +68,8 @@ public class QueryUtil {
   
   public static Text getForwardIndex(String path) {
     String part = path.substring(path.lastIndexOf("/") + 1);
-    if (part.length() == 0) return null;
+    if (part.length() == 0)
+      return null;
     Text row = new Text(FORWARD_PREFIX);
     row.append(part.getBytes(), 0, part.length());
     return row;
@@ -76,7 +77,8 @@ public class QueryUtil {
   
   public static Text getReverseIndex(String path) {
     String part = path.substring(path.lastIndexOf("/") + 1);
-    if (part.length() == 0) return null;
+    if (part.length() == 0)
+      return null;
     byte[] rev = new byte[part.length()];
     int i = part.length() - 1;
     for (byte b : part.getBytes())
@@ -87,7 +89,8 @@ public class QueryUtil {
   }
   
   public static String getType(Text colf) {
-    if (colf.equals(DIR_COLF)) return colf.toString() + ":";
+    if (colf.equals(DIR_COLF))
+      return colf.toString() + ":";
     try {
       return Long.toString(LongSummation.bytesToLong(colf.getBytes())) + ":";
     } catch (IOException e) {
@@ -96,7 +99,8 @@ public class QueryUtil {
   }
   
   public Map<String,String> getData(String path) throws TableNotFoundException {
-    if (path.endsWith("/")) path = path.substring(0, path.length() - 1);
+    if (path.endsWith("/"))
+      path = path.substring(0, path.length() - 1);
     Scanner scanner = conn.createScanner(tableName, auths);
     scanner.setRange(new Range(getRow(path)));
     Map<String,String> data = new TreeMap<String,String>();
@@ -110,7 +114,8 @@ public class QueryUtil {
   }
   
   public Map<String,Map<String,String>> getDirList(String path) throws TableNotFoundException {
-    if (!path.endsWith("/")) path = path + "/";
+    if (!path.endsWith("/"))
+      path = path + "/";
     Map<String,Map<String,String>> fim = new TreeMap<String,Map<String,String>>();
     Scanner scanner = conn.createScanner(tableName, auths);
     scanner.setRange(prefix(getRow(path)));
@@ -137,7 +142,8 @@ public class QueryUtil {
   }
   
   public Iterable<Entry<Key,Value>> singleRestrictedWildCardSearch(String exp) throws Exception {
-    if (exp.indexOf("/") >= 0) throw new Exception("this method only works with unqualified names");
+    if (exp.indexOf("/") >= 0)
+      throw new Exception("this method only works with unqualified names");
     
     Scanner scanner = conn.createScanner(tableName, auths);
     if (exp.startsWith("*")) {
@@ -158,7 +164,8 @@ public class QueryUtil {
   
   public Iterable<Entry<Key,Value>> singleWildCardSearch(String exp) throws Exception {
     int starIndex = exp.indexOf("*");
-    if (exp.indexOf("*", starIndex + 1) >= 0) throw new Exception("only one wild card for search");
+    if (exp.indexOf("*", starIndex + 1) >= 0)
+      throw new Exception("only one wild card for search");
     
     if (starIndex < 0) {
       return exactTermSearch(exp);
@@ -190,7 +197,8 @@ public class QueryUtil {
     int changeIndex = prefix.getLength() - 1;
     while (changeIndex >= 0 && prefixBytes[changeIndex] == (byte) 0xff)
       changeIndex--;
-    if (changeIndex < 0) return null;
+    if (changeIndex < 0)
+      return null;
     
     // copy prefix bytes into new array
     byte[] newBytes = new byte[changeIndex + 1];

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/StringArraySummation.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/StringArraySummation.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/StringArraySummation.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/StringArraySummation.java Thu Oct 27 15:24:51 2011
@@ -49,7 +49,8 @@ public class StringArraySummation implem
   }
   
   public static byte[] longArrayToStringBytes(Long[] l) {
-    if (l.length == 0) return new byte[] {};
+    if (l.length == 0)
+      return new byte[] {};
     StringBuilder sb = new StringBuilder(Long.toString(l[0]));
     for (int i = 1; i < l.length; i++) {
       sb.append(",");

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Viewer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Viewer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Viewer.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/dirlist/Viewer.java Thu Oct 27 15:24:51 2011
@@ -63,7 +63,8 @@ public class Viewer extends JFrame imple
     
     public String getFullName() {
       String fn = data.get("fullname");
-      if (fn == null) return name;
+      if (fn == null)
+        return name;
       return fn;
     }
     
@@ -166,7 +167,8 @@ public class Viewer extends JFrame imple
   @Override
   public void valueChanged(TreeSelectionEvent e) {
     TreePath selected = e.getNewLeadSelectionPath();
-    if (selected == null) return;
+    if (selected == null)
+      return;
     DefaultMutableTreeNode node = (DefaultMutableTreeNode) selected.getLastPathComponent();
     text.setText(getText(node));
   }
@@ -177,7 +179,8 @@ public class Viewer extends JFrame imple
       System.exit(1);
     }
     String rootpath = "/";
-    if (args.length == 7) rootpath = args[6];
+    if (args.length == 7)
+      rootpath = args[6];
     Viewer v = new Viewer(args[0], args[1], args[2], args[3], args[4], new Authorizations(args[5].split(",")), rootpath);
     v.init();
     v.setVisible(true);

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithBatchWriter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithBatchWriter.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithBatchWriter.java Thu Oct 27 15:24:51 2011
@@ -50,7 +50,8 @@ public class InsertWithBatchWriter {
     
     BatchWriter bw = null;
     
-    if (!connector.tableOperations().exists(tableName)) connector.tableOperations().create(tableName);
+    if (!connector.tableOperations().exists(tableName))
+      connector.tableOperations().create(tableName);
     bw = mtbw.getBatchWriter(tableName);
     
     Text colf = new Text("colfam");
@@ -61,7 +62,8 @@ public class InsertWithBatchWriter {
         m.put(colf, new Text(String.format("colqual_%d", j)), new Value((String.format("value_%d_%d", i, j)).getBytes()));
       }
       bw.addMutation(m);
-      if (i % 100 == 0) System.out.println(i);
+      if (i % 100 == 0)
+        System.out.println(i);
     }
     
     mtbw.close();

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithOutputFormat.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithOutputFormat.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/helloworld/InsertWithOutputFormat.java Thu Oct 27 15:24:51 2011
@@ -63,7 +63,8 @@ public class InsertWithOutputFormat exte
         m.put(colf, new Text(String.format("colqual_%d", j)), new Value((String.format("value_%d_%d", i, j)).getBytes()));
       }
       rw.write(tableName, m); // repeat until done
-      if (i % 100 == 0) System.out.println(i);
+      if (i % 100 == 0)
+        System.out.println(i);
     }
     
     rw.close(context); // close when done

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/isolation/InterferenceTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/isolation/InterferenceTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/isolation/InterferenceTest.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/isolation/InterferenceTest.java Thu Oct 27 15:24:51 2011
@@ -98,12 +98,15 @@ public class InterferenceTest {
         HashSet<String> values = new HashSet<String>();
         
         for (Entry<Key,Value> entry : scanner) {
-          if (row == null) row = entry.getKey().getRowData();
+          if (row == null)
+            row = entry.getKey().getRowData();
           
           if (!row.equals(entry.getKey().getRowData())) {
-            if (count != NUM_COLUMNS) System.err.println("ERROR Did not see " + NUM_COLUMNS + " columns in row " + row);
+            if (count != NUM_COLUMNS)
+              System.err.println("ERROR Did not see " + NUM_COLUMNS + " columns in row " + row);
             
-            if (values.size() > 1) System.err.println("ERROR Columns in row " + row + " had multiple values " + values);
+            if (values.size() > 1)
+              System.err.println("ERROR Columns in row " + row + " had multiple values " + values);
             
             row = entry.getKey().getRowData();
             count = 0;
@@ -115,9 +118,11 @@ public class InterferenceTest {
           values.add(entry.getValue().toString());
         }
         
-        if (count > 0 && count != NUM_COLUMNS) System.err.println("ERROR Did not see " + NUM_COLUMNS + " columns in row " + row);
+        if (count > 0 && count != NUM_COLUMNS)
+          System.err.println("ERROR Did not see " + NUM_COLUMNS + " columns in row " + row);
         
-        if (values.size() > 1) System.err.println("ERROR Columns in row " + row + " had multiple values " + values);
+        if (values.size() > 1)
+          System.err.println("ERROR Columns in row " + row + " had multiple values " + values);
       }
     }
   }
@@ -136,7 +141,9 @@ public class InterferenceTest {
     String table = args[4];
     
     new Thread(new Writer(conn.createBatchWriter(table, 10000000, 60000l, 3))).start();
-    if (Boolean.parseBoolean(args[5])) new Thread(new Reader(new IsolatedScanner(conn.createScanner(table, Constants.NO_AUTHS)))).start();
-    else new Thread(new Reader(conn.createScanner(table, Constants.NO_AUTHS))).start();
+    if (Boolean.parseBoolean(args[5]))
+      new Thread(new Reader(new IsolatedScanner(conn.createScanner(table, Constants.NO_AUTHS)))).start();
+    else
+      new Thread(new Reader(conn.createScanner(table, Constants.NO_AUTHS))).start();
   }
 }

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

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

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

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TeraSortIngest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TeraSortIngest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TeraSortIngest.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/TeraSortIngest.java Thu Oct 27 15:24:51 2011
@@ -301,7 +301,8 @@ public class TeraSortIngest extends Conf
         valuelen -= 10;
       }
       
-      if (valuelen > 0) value.append(filler[(base + valuelen) % 26], 0, valuelen);
+      if (valuelen > 0)
+        value.append(filler[(base + valuelen) % 26], 0, valuelen);
     }
     
     public void map(LongWritable row, NullWritable ignored, Context context) throws IOException, InterruptedException {
@@ -367,7 +368,8 @@ public class TeraSortIngest extends Conf
     conf.setInt("cloudgen.maxvaluelength", Integer.parseInt(args[4]));
     conf.set("cloudgen.tablename", args[5]);
     
-    if (args.length > 10) conf.setInt(ROWSPERSPLIT, Integer.parseInt(args[10]));
+    if (args.length > 10)
+      conf.setInt(ROWSPERSPLIT, Integer.parseInt(args[10]));
     
     job.waitForCompletion(true);
     return job.isSuccessful() ? 0 : 1;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/BulkIngestExample.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/BulkIngestExample.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/BulkIngestExample.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/BulkIngestExample.java Thu Oct 27 15:24:51 2011
@@ -145,7 +145,8 @@ public class BulkIngestExample extends C
     } catch (Exception e) {
       throw new RuntimeException(e);
     } finally {
-      if (out != null) out.close();
+      if (out != null)
+        out.close();
     }
     
     return 0;

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/VerifyIngest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/VerifyIngest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/VerifyIngest.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/mapreduce/bulk/VerifyIngest.java Thu Oct 27 15:24:51 2011
@@ -84,7 +84,8 @@ public class VerifyIngest {
       
     }
     
-    if (ok) System.out.println("OK");
+    if (ok)
+      System.out.println("OK");
     
     System.exit(ok ? 0 : 1);
   }

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/ContinuousQuery.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/ContinuousQuery.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/ContinuousQuery.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/ContinuousQuery.java Thu Oct 27 15:24:51 2011
@@ -98,7 +98,8 @@ public class ContinuousQuery {
     for (Entry<Key,Value> entry : scanner) {
       Key key = entry.getKey();
       
-      if (currentRow == null) currentRow = key.getRow();
+      if (currentRow == null)
+        currentRow = key.getRow();
       
       if (!currentRow.equals(key.getRow())) {
         selectRandomWords(words, ret, rand, numTerms);

Modified: incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/Index.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/Index.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/Index.java (original)
+++ incubator/accumulo/branches/1.3/src/examples/src/main/java/org/apache/accumulo/examples/shard/Index.java Thu Oct 27 15:24:51 2011
@@ -58,7 +58,8 @@ public class Index {
       }
     }
     
-    if (m.size() > 0) bw.addMutation(m);
+    if (m.size() > 0)
+      bw.addMutation(m);
   }
   
   private static void index(int numPartitions, File src, String splitRegex, BatchWriter bw) throws Exception {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java Thu Oct 27 15:24:51 2011
@@ -44,7 +44,8 @@ public class Accumulo {
   private static Integer dataVersion = null;
   
   public static synchronized int getAccumuloPersistentVersion() {
-    if (dataVersion != null) return dataVersion;
+    if (dataVersion != null)
+      return dataVersion;
     
     Configuration conf = CachedConfiguration.getInstance();
     try {
@@ -84,14 +85,18 @@ public class Accumulo {
     // Setup logging.
     System.setProperty("org.apache.accumulo.core.dir.home", System.getenv("ACCUMULO_HOME"));
     
-    if (System.getenv("ACCUMULO_LOG_DIR") != null) System.setProperty("org.apache.accumulo.core.dir.log", System.getenv("ACCUMULO_LOG_DIR"));
-    else System.setProperty("org.apache.accumulo.core.dir.log", System.getenv("ACCUMULO_HOME") + "/logs/");
+    if (System.getenv("ACCUMULO_LOG_DIR") != null)
+      System.setProperty("org.apache.accumulo.core.dir.log", System.getenv("ACCUMULO_LOG_DIR"));
+    else
+      System.setProperty("org.apache.accumulo.core.dir.log", System.getenv("ACCUMULO_HOME") + "/logs/");
     
     String localhost = InetAddress.getLocalHost().getHostName();
     System.setProperty("org.apache.accumulo.core.ip.localhost.hostname", localhost);
     
-    if (System.getenv("ACCUMULO_LOG_HOST") != null) System.setProperty("org.apache.accumulo.core.host.log", System.getenv("ACCUMULO_LOG_HOST"));
-    else System.setProperty("org.apache.accumulo.core.host.log", localhost);
+    if (System.getenv("ACCUMULO_LOG_HOST") != null)
+      System.setProperty("org.apache.accumulo.core.host.log", System.getenv("ACCUMULO_LOG_HOST"));
+    else
+      System.setProperty("org.apache.accumulo.core.host.log", localhost);
     
     // Use a specific log config, if it exists
     String logConfig = String.format("%s/conf/%s_logger.xml", System.getenv("ACCUMULO_HOME"), application);
@@ -131,7 +136,8 @@ public class Accumulo {
     try {
       String directories[] = {Constants.ZCONFIG, Constants.ZTRACERS, Constants.ZDOOMEDSERVERS};
       for (String dir : directories)
-        if (!ZooUtil.exists(dir)) ZooUtil.putPersistentData(ZooUtil.getRoot(instanceId) + dir, new byte[] {}, NodeExistsPolicy.SKIP);
+        if (!ZooUtil.exists(dir))
+          ZooUtil.putPersistentData(ZooUtil.getRoot(instanceId) + dir, new byte[] {}, NodeExistsPolicy.SKIP);
     } catch (Exception ex) {
       log.error("Unable to create config location in zookeeper");
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java Thu Oct 27 15:24:51 2011
@@ -60,7 +60,8 @@ public class ClientServiceHandler implem
   
   protected String checkTableId(String tableName, TableOperation operation) throws ThriftTableOperationException {
     final String tableId = Tables.getNameToIdMap(HdfsZooInstance.getInstance()).get(tableName);
-    if (tableId == null) throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.NOTFOUND, null);
+    if (tableId == null)
+      throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.NOTFOUND, null);
     return tableId;
   }
   
@@ -224,7 +225,8 @@ public class ClientServiceHandler implem
         try {
           Path newBulkDir = new Path(directory, "bulk_" + uuid);
           if (!fs.exists(newBulkDir)) {
-            if (fs.mkdirs(newBulkDir)) return newBulkDir;
+            if (fs.mkdirs(newBulkDir))
+              return newBulkDir;
             log.warn("Failed to create " + newBulkDir + " for unknown reason");
           } else {
             // name collision
@@ -249,8 +251,8 @@ public class ClientServiceHandler implem
       ThriftTableOperationException, TException {
     String tableId = checkTableId(tableName, TableOperation.PERMISSION);
     try {
-      if (!authenticator.hasTablePermission(credentials, credentials.getUser(), tableId, TablePermission.BULK_IMPORT)) throw new AccumuloSecurityException(
-          credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
+      if (!authenticator.hasTablePermission(credentials, credentials.getUser(), tableId, TablePermission.BULK_IMPORT))
+        throw new AccumuloSecurityException(credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
       FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
       Path bulkDir = createNewBulkDir(fs, tableId);
       Path procFile = new Path(bulkDir.toString() + "/processing_proc_" + System.currentTimeMillis());
@@ -264,8 +266,8 @@ public class ClientServiceHandler implem
       int errorCount = 0;
       
       for (FileStatus fileStatus : mapFiles) {
-        if ((double) errorCount / (double) mapFiles.length > errPercent) throw new IOException(String.format("More than %6.2f%s of map files failed to move",
-            errPercent * 100.0, "%"));
+        if ((double) errorCount / (double) mapFiles.length > errPercent)
+          throw new IOException(String.format("More than %6.2f%s of map files failed to move", errPercent * 100.0, "%"));
         
         String sa[] = fileStatus.getPath().getName().split("\\.");
         String extension = "";
@@ -323,15 +325,16 @@ public class ClientServiceHandler implem
     String tableId = checkTableId(tableName, TableOperation.PERMISSION);
     try {
       // make sure the user can still do bulk import
-      if (!authenticator.hasTablePermission(credentials, credentials.getUser(), tableId, TablePermission.BULK_IMPORT)) throw new AccumuloSecurityException(
-          credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
+      if (!authenticator.hasTablePermission(credentials, credentials.getUser(), tableId, TablePermission.BULK_IMPORT))
+        throw new AccumuloSecurityException(credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
       Path lockPath = new Path(lockFile);
       Path bulkDir = lockPath.getParent();
       // ensure the table matches
-      if (!bulkDir.getParent().getName().equals(tableId)) throw new AccumuloSecurityException(credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
+      if (!bulkDir.getParent().getName().equals(tableId))
+        throw new AccumuloSecurityException(credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
       // ensure the location is in the table directory
-      if (!bulkDir.getParent().getParent().toString().equals(Constants.getTablesDir())) throw new AccumuloSecurityException(credentials.getUser(),
-          SecurityErrorCode.PERMISSION_DENIED);
+      if (!bulkDir.getParent().getParent().toString().equals(Constants.getTablesDir()))
+        throw new AccumuloSecurityException(credentials.getUser(), SecurityErrorCode.PERMISSION_DENIED);
       FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
       
       if (disableGC) {
@@ -342,7 +345,8 @@ public class ClientServiceHandler implem
         fsOut2.close();
       }
       
-      if (lockPath.getName().startsWith("processing_proc_")) fs.delete(lockPath, false);
+      if (lockPath.getName().startsWith("processing_proc_"))
+        fs.delete(lockPath, false);
       
     } catch (AccumuloSecurityException ex) {
       throw ex.asThriftException();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/ConstraintChecker.java Thu Oct 27 15:24:51 2011
@@ -53,7 +53,8 @@ public class ConstraintChecker {
       if (violationCodes != null) {
         for (Short vcode : violationCodes) {
           ConstraintViolationSummary cvs = new ConstraintViolationSummary(constraint.getClass().getName(), vcode, constraint.getViolationDescription(vcode), 1);
-          if (violations == null) violations = new Violations();
+          if (violations == null)
+            violations = new Violations();
           violations.add(cvs);
         }
       } else if (throwable != null) {
@@ -80,7 +81,8 @@ public class ConstraintChecker {
         }
         
         ConstraintViolationSummary cvs = new ConstraintViolationSummary(constraint.getClass().getName(), vcode, "CONSTRAINT FAILED : " + msg, 1);
-        if (violations == null) violations = new Violations();
+        if (violations == null)
+          violations = new Violations();
         violations.add(cvs);
       }
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java Thu Oct 27 15:24:51 2011
@@ -101,44 +101,55 @@ public class MetadataConstraints impleme
     byte[] row = mutation.getRow();
     
     // always allow rows that fall within reserved area
-    if (row.length > 0 && row[0] == '~') return null;
+    if (row.length > 0 && row[0] == '~')
+      return null;
     
     for (byte b : row) {
       if (b == ';') {
         containsSemiC = true;
       }
       
-      if (b == ';' || b == '<') break;
+      if (b == ';' || b == '<')
+        break;
       
       if (!validTableNameChars[0xff & b]) {
-        if (violations == null) violations = new ArrayList<Short>();
-        if (!violations.contains((short) 4)) violations.add((short) 4);
+        if (violations == null)
+          violations = new ArrayList<Short>();
+        if (!violations.contains((short) 4))
+          violations.add((short) 4);
       }
     }
     
     if (!containsSemiC) {
       // see if last row char is <
       if (row.length == 0 || row[row.length - 1] != '<') {
-        if (violations == null) violations = new ArrayList<Short>();
-        if (!violations.contains((short) 4)) violations.add((short) 4);
+        if (violations == null)
+          violations = new ArrayList<Short>();
+        if (!violations.contains((short) 4))
+          violations.add((short) 4);
       }
     } else {
       if (row.length == 0) {
-        if (violations == null) violations = new ArrayList<Short>();
-        if (!violations.contains((short) 4)) violations.add((short) 4);
+        if (violations == null)
+          violations = new ArrayList<Short>();
+        if (!violations.contains((short) 4))
+          violations.add((short) 4);
       }
     }
     
     if (row.length > 0 && row[0] == '!') {
       if (row.length < 3 || row[1] != '0' || (row[2] != '<' && row[2] != ';')) {
-        if (violations == null) violations = new ArrayList<Short>();
-        if (!violations.contains((short) 4)) violations.add((short) 4);
+        if (violations == null)
+          violations = new ArrayList<Short>();
+        if (!violations.contains((short) 4))
+          violations.add((short) 4);
       }
     }
     
     // ensure row is not less than Constants.METADATA_TABLE_ID
     if (new Text(row).compareTo(new Text(Constants.METADATA_TABLE_ID)) < 0) {
-      if (violations == null) violations = new ArrayList<Short>();
+      if (violations == null)
+        violations = new ArrayList<Short>();
       violations.add((short) 5);
     }
     
@@ -147,14 +158,16 @@ public class MetadataConstraints impleme
       
       if (columnUpdate.isDeleted()) {
         if (!isValidColumn(columnUpdate)) {
-          if (violations == null) violations = new ArrayList<Short>();
+          if (violations == null)
+            violations = new ArrayList<Short>();
           violations.add((short) 2);
         }
         continue;
       }
       
       if (columnUpdate.getValue().length == 0 && !columnFamily.equals(Constants.METADATA_SCANFILE_COLUMN_FAMILY)) {
-        if (violations == null) violations = new ArrayList<Short>();
+        if (violations == null)
+          violations = new ArrayList<Short>();
         violations.add((short) 6);
       }
       
@@ -163,21 +176,25 @@ public class MetadataConstraints impleme
           DataFileValue dfv = new DataFileValue(columnUpdate.getValue());
           
           if (dfv.getSize() < 0 || dfv.getNumEntries() < 0) {
-            if (violations == null) violations = new ArrayList<Short>();
+            if (violations == null)
+              violations = new ArrayList<Short>();
             violations.add((short) 1);
           }
         } catch (NumberFormatException nfe) {
-          if (violations == null) violations = new ArrayList<Short>();
+          if (violations == null)
+            violations = new ArrayList<Short>();
           violations.add((short) 1);
         } catch (ArrayIndexOutOfBoundsException aiooe) {
-          if (violations == null) violations = new ArrayList<Short>();
+          if (violations == null)
+            violations = new ArrayList<Short>();
           violations.add((short) 1);
         }
       } else if (columnFamily.equals(Constants.METADATA_SCANFILE_COLUMN_FAMILY)) {
         
       } else {
         if (!isValidColumn(columnUpdate)) {
-          if (violations == null) violations = new ArrayList<Short>();
+          if (violations == null)
+            violations = new ArrayList<Short>();
           violations.add((short) 2);
         } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_PREV_ROW_COLUMN) && columnUpdate.getValue().length > 0
             && (violations == null || !violations.contains((short) 4))) {
@@ -188,7 +205,8 @@ public class MetadataConstraints impleme
           boolean prevEndRowLessThanEndRow = per == null || ke.getEndRow() == null || per.compareTo(ke.getEndRow()) < 0;
           
           if (!prevEndRowLessThanEndRow) {
-            if (violations == null) violations = new ArrayList<Short>();
+            if (violations == null)
+              violations = new ArrayList<Short>();
             violations.add((short) 3);
           }
         } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_LOCK_COLUMN)) {
@@ -210,7 +228,8 @@ public class MetadataConstraints impleme
           }
           
           if (!lockHeld) {
-            if (violations == null) violations = new ArrayList<Short>();
+            if (violations == null)
+              violations = new ArrayList<Short>();
             violations.add((short) 7);
           }
         }
@@ -246,7 +265,8 @@ public class MetadataConstraints impleme
   }
   
   protected void finalize() {
-    if (zooCache != null) zooCache.clear();
+    if (zooCache != null)
+      zooCache.clear();
   }
   
 }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java Thu Oct 27 15:24:51 2011
@@ -177,7 +177,8 @@ public class GarbageCollectWriteAheadLog
     while (iterator.hasNext()) {
       for (String filename : iterator.next().logSet) {
         filename = filename.split("/", 2)[1];
-        if (fileToServerMap.remove(filename) != null) status.currentLog.inUse++;
+        if (fileToServerMap.remove(filename) != null)
+          status.currentLog.inUse++;
         count++;
       }
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java Thu Oct 27 15:24:51 2011
@@ -135,7 +135,8 @@ public class SimpleGarbageCollector impl
     try {
       fs = FileSystem.get(CachedConfiguration.getInstance());
       commandLine = new BasicParser().parse(opts, args);
-      if (commandLine.getArgs().length != 0) throw new ParseException("Extraneous arguments");
+      if (commandLine.getArgs().length != 0)
+        throw new ParseException("Extraneous arguments");
       
       safemode = commandLine.hasOption(optSafeMode.getOpt());
       offline = commandLine.hasOption(optOffline.getOpt());
@@ -192,7 +193,8 @@ public class SimpleGarbageCollector impl
     Sampler sampler = new CountSampler(100);
     
     while (true) {
-      if (sampler.next()) Trace.on("gc");
+      if (sampler.next())
+        Trace.on("gc");
       
       Span gcSpan = Trace.start("loop");
       tStart = System.currentTimeMillis();
@@ -218,11 +220,12 @@ public class SimpleGarbageCollector impl
         
         // STEP 3: delete files
         if (safemode) {
-          if (verbose) System.out.println("SAFEMODE: There are " + candidates.size() + " data file candidates marked for deletion.\n"
-              + "          Examine the log files to identify them.\n" + "          They can be removed by executing: bin/accumulo gc --offline\n"
-              + "WARNING:  Do not run the garbage collector in offline mode unless you are positive\n"
-              + "          that the accumulo METADATA table is in a clean state, or that accumulo\n"
-              + "          has not yet been run, in the case of an upgrade.");
+          if (verbose)
+            System.out.println("SAFEMODE: There are " + candidates.size() + " data file candidates marked for deletion.\n"
+                + "          Examine the log files to identify them.\n" + "          They can be removed by executing: bin/accumulo gc --offline\n"
+                + "WARNING:  Do not run the garbage collector in offline mode unless you are positive\n"
+                + "          that the accumulo METADATA table is in a clean state, or that accumulo\n"
+                + "          has not yet been run, in the case of an upgrade.");
           log.info("SAFEMODE: Listing all data file candidates for deletion");
           for (String s : candidates)
             log.info("SAFEMODE: " + s);
@@ -250,7 +253,8 @@ public class SimpleGarbageCollector impl
       tStop = System.currentTimeMillis();
       log.info(String.format("Collect cycle took %.2f seconds", ((tStop - tStart) / 1000.0)));
       
-      if (offline) break;
+      if (offline)
+        break;
       
       if (candidateMemExceeded) {
         log.info("Gathering of candidates was interrupted due to memory shortage. Bypassing cycle delay to collect the remaining candidates.");
@@ -383,7 +387,8 @@ public class SimpleGarbageCollector impl
       log.debug("Checking for bulk processing files");
       HashSet<String> bulks = new HashSet<String>();
       for (String candidate : candidates) {
-        if (candidate.contains("/bulk_")) bulks.add(candidate.substring(0, candidate.lastIndexOf('/')));
+        if (candidate.contains("/bulk_"))
+          bulks.add(candidate.substring(0, candidate.lastIndexOf('/')));
       }
       log.debug("... looking at " + bulks.size() + " bulk directories");
       TreeSet<String> processing = new TreeSet<String>();
@@ -448,8 +453,10 @@ public class SimpleGarbageCollector impl
           
           // WARNING: This line is EXTREMELY IMPORTANT.
           // You MUST REMOVE candidates that are still in use
-          if (candidates.remove(delete)) log.debug("Candidate was still in use in the METADATA table: " + delete);
-        } else throw new AccumuloException("Scanner over metadata table returned unexpected column : " + entry.getKey());
+          if (candidates.remove(delete))
+            log.debug("Candidate was still in use in the METADATA table: " + delete);
+        } else
+          throw new AccumuloException("Scanner over metadata table returned unexpected column : " + entry.getKey());
       }
     }
   }
@@ -513,7 +520,8 @@ public class SimpleGarbageCollector impl
                 String tableId = parts[1];
                 TableManager.getInstance().updateTableStateCache(tableId);
                 TableState tableState = TableManager.getInstance().getTableState(tableId);
-                if (tableState != null && tableState != TableState.DELETING) log.warn("File doesn't exist: " + p);
+                if (tableState != null && tableState != TableState.DELETING)
+                  log.warn("File doesn't exist: " + p);
               } else {
                 log.warn("Very strange path name: " + file);
               }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileKey.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileKey.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileKey.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileKey.java Thu Oct 27 15:24:51 2011
@@ -135,8 +135,10 @@ public class LogFileKey implements Writa
   }
   
   private static int sign(long l) {
-    if (l < 0) return -1;
-    if (l > 0) return 1;
+    if (l < 0)
+      return -1;
+    if (l > 0)
+      return 1;
     return 0;
   }
   
@@ -145,7 +147,8 @@ public class LogFileKey implements Writa
     if (eventType(this.event) != eventType(o.event)) {
       return eventType(this.event) - eventType(o.event);
     }
-    if (this.event == OPEN) return 0;
+    if (this.event == OPEN)
+      return 0;
     if (this.tid != o.tid) {
       return this.tid - o.tid;
     }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileValue.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileValue.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileValue.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogFileValue.java Thu Oct 27 15:24:51 2011
@@ -63,7 +63,8 @@ public class LogFileValue implements Wri
   }
   
   public static String format(LogFileValue lfv, int maxMutations) {
-    if (lfv.mutations.length == 0) return "";
+    if (lfv.mutations.length == 0)
+      return "";
     StringBuilder builder = new StringBuilder();
     builder.append(lfv.mutations.length + " mutations:\n");
     for (int i = 0; i < lfv.mutations.length; i++) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogReader.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogReader.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogReader.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogReader.java Thu Oct 27 15:24:51 2011
@@ -70,8 +70,10 @@ public class LogReader {
       usage();
       return;
     }
-    if (cl.hasOption(rowOpt.getOpt())) row = new Text(cl.getOptionValue(rowOpt.getOpt()));
-    if (cl.hasOption(maxOpt.getOpt())) max = Integer.parseInt(cl.getOptionValue(maxOpt.getOpt()));
+    if (cl.hasOption(rowOpt.getOpt()))
+      row = new Text(cl.getOptionValue(rowOpt.getOpt()));
+    if (cl.hasOption(maxOpt.getOpt()))
+      max = Integer.parseInt(cl.getOptionValue(maxOpt.getOpt()));
     
     for (String file : files) {
       
@@ -119,7 +121,8 @@ public class LogReader {
           }
         }
         
-        if (!found) return;
+        if (!found)
+          return;
       } else {
         return;
       }

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java Thu Oct 27 15:24:51 2011
@@ -122,7 +122,8 @@ public class LogService implements Mutat
       throw new RuntimeException(msg);
     }
     String root = AccumuloConfiguration.getSystemConfiguration().get(Property.LOGGER_DIR);
-    if (root.equals("")) root = System.getProperty("org.apache.accumulo.core.dir.log");
+    if (root.equals(""))
+      root = System.getProperty("org.apache.accumulo.core.dir.log");
     if (root == null || root.isEmpty()) {
       String msg = "Write-ahead log directory not set!";
       LOG.fatal(msg);
@@ -131,11 +132,13 @@ public class LogService implements Mutat
     
     FileOutputStream lockOutputStream = new FileOutputStream(root + "/.lock");
     fileLock = lockOutputStream.getChannel().tryLock();
-    if (fileLock == null) throw new IOException("Failed to acquire lock file");
+    if (fileLock == null)
+      throw new IOException("Failed to acquire lock file");
     
     try {
       File test = new File(root, "test_writable");
-      if (!test.mkdir()) throw new RuntimeException("Unable to write to write-ahead log directory " + root);
+      if (!test.mkdir())
+        throw new RuntimeException("Unable to write to write-ahead log directory " + root);
       test.delete();
     } catch (Throwable t) {
       LOG.fatal("Unable to write to write-ahead log directory", t);

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogWriter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogWriter.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/logger/LogWriter.java Thu Oct 27 15:24:51 2011
@@ -120,12 +120,15 @@ class LogWriter implements MutationLogge
         long t1 = System.currentTimeMillis();
         seq.append(key, value);
         long t2 = System.currentTimeMillis();
-        if (metrics.isEnabled()) metrics.add(LogWriterMetrics.logAppend, (t2 - t1));
+        if (metrics.isEnabled())
+          metrics.add(LogWriterMetrics.logAppend, (t2 - t1));
         out.flush();
         long t3 = System.currentTimeMillis();
-        if (metrics.isEnabled()) metrics.add(LogWriterMetrics.logFlush, (t3 - t2));
+        if (metrics.isEnabled())
+          metrics.add(LogWriterMetrics.logFlush, (t3 - t2));
       } catch (IOException ioe) {
-        if (metrics.isEnabled()) metrics.add(LogWriterMetrics.logException, 0);
+        if (metrics.isEnabled())
+          metrics.add(LogWriterMetrics.logException, 0);
         throw ioe;
       }
     }
@@ -206,7 +209,8 @@ class LogWriter implements MutationLogge
         if (entry.getValue().equals(id)) {
           file2id.remove(entry.getKey());
           long t2 = System.currentTimeMillis();
-          if (metrics.isEnabled()) metrics.add(LogWriterMetrics.close, (t2 - t1));
+          if (metrics.isEnabled())
+            metrics.add(LogWriterMetrics.close, (t2 - t1));
           return;
         }
       }
@@ -224,14 +228,16 @@ class LogWriter implements MutationLogge
     long t1 = System.currentTimeMillis();
     try {
       Long id = file2id.get(localLog);
-      if (id != null) close(info, id);
+      if (id != null)
+        close(info, id);
     } catch (NoSuchLogIDException e) {
       log.error("Unexpected error thrown", e);
       throw new RuntimeException(e);
     }
     File file = new File(root, localLog);
     log.info(file.getAbsoluteFile().toString());
-    if (!file.exists()) throw new RuntimeException("No log " + file + " exists");
+    if (!file.exists())
+      throw new RuntimeException("No log " + file + " exists");
     long result = file.length();
     
     copyThreadPool.execute(new Runnable() {
@@ -277,7 +283,8 @@ class LogWriter implements MutationLogge
             final LogFileKey key = new LogFileKey();
             final LogFileValue value = new LogFileValue();
             try {
-              if (!reader.next(key, value)) break;
+              if (!reader.next(key, value))
+                break;
             } catch (EOFException e) {
               log.warn("Unexpected end of file reading write ahead log " + localLog);
               break;
@@ -290,7 +297,8 @@ class LogWriter implements MutationLogge
               memorySize = 0;
             }
           }
-          if (!kv.isEmpty()) writeSortedEntries(dest, part++, kv);
+          if (!kv.isEmpty())
+            writeSortedEntries(dest, part++, kv);
           fs.create(new Path(dest, "finished")).close();
         } finally {
           reader.close();
@@ -345,8 +353,10 @@ class LogWriter implements MutationLogge
         } catch (IOException ex) {
           log.warn("May have a partial copy of a recovery file: " + localLog, ex);
         } finally {
-          if (reader != null) reader.close();
-          if (writer != null) writer.close();
+          if (reader != null)
+            reader.close();
+          if (writer != null)
+            writer.close();
         }
         // Make file appear in the shared file system as the target name only after it is completely copied
         fs.rename(dest, new Path(fullyQualifiedFileName));
@@ -354,7 +364,8 @@ class LogWriter implements MutationLogge
       }
     });
     long t2 = System.currentTimeMillis();
-    if (metrics.isEnabled()) metrics.add(LogWriterMetrics.copy, (t2 - t1));
+    if (metrics.isEnabled())
+      metrics.add(LogWriterMetrics.copy, (t2 - t1));
     return result;
   }
   
@@ -388,7 +399,8 @@ class LogWriter implements MutationLogge
       throw new RuntimeException(e);
     }
     long t2 = System.currentTimeMillis();
-    if (metrics.isEnabled()) metrics.add(LogWriterMetrics.create, (t2 - t1));
+    if (metrics.isEnabled())
+      metrics.add(LogWriterMetrics.create, (t2 - t1));
     log.info("Created log " + result.name);
     return result;
   }
@@ -396,7 +408,8 @@ class LogWriter implements MutationLogge
   @Override
   public void log(TInfo info, long id, final long seq, final int tid, final TMutation mutation) throws NoSuchLogIDException {
     Logger out = logs.get(id);
-    if (out == null) throw new NoSuchLogIDException();
+    if (out == null)
+      throw new NoSuchLogIDException();
     
     out.key.event = MUTATION;
     out.key.seq = seq;
@@ -418,7 +431,8 @@ class LogWriter implements MutationLogge
   
   private void logMany(TInfo info, long id, final long seq, final int tid, Mutation muations[]) throws NoSuchLogIDException {
     Logger out = logs.get(id);
-    if (out == null) throw new NoSuchLogIDException();
+    if (out == null)
+      throw new NoSuchLogIDException();
     out.key.event = MANY_MUTATIONS;
     out.key.seq = seq;
     out.key.tid = tid;
@@ -439,7 +453,8 @@ class LogWriter implements MutationLogge
   @Override
   public void minorCompactionFinished(TInfo info, long id, final long seq, final int tid, final String fqfn) throws NoSuchLogIDException {
     Logger out = logs.get(id);
-    if (out == null) throw new NoSuchLogIDException();
+    if (out == null)
+      throw new NoSuchLogIDException();
     out.key.event = COMPACTION_FINISH;
     out.key.seq = seq;
     out.key.tid = tid;
@@ -461,7 +476,8 @@ class LogWriter implements MutationLogge
   @Override
   public void minorCompactionStarted(TInfo info, long id, final long seq, final int tid, final String fqfn) throws NoSuchLogIDException {
     Logger out = logs.get(id);
-    if (out == null) throw new NoSuchLogIDException();
+    if (out == null)
+      throw new NoSuchLogIDException();
     out.key.event = COMPACTION_START;
     out.key.seq = seq;
     out.key.tid = tid;
@@ -483,7 +499,8 @@ class LogWriter implements MutationLogge
   @Override
   public void defineTablet(TInfo info, long id, final long seq, final int tid, final TKeyExtent tablet) throws NoSuchLogIDException {
     Logger out = logs.get(id);
-    if (out == null) throw new NoSuchLogIDException();
+    if (out == null)
+      throw new NoSuchLogIDException();
     out.key.event = DEFINE_TABLET;
     out.key.seq = seq;
     out.key.tid = tid;
@@ -521,9 +538,11 @@ class LogWriter implements MutationLogge
     ArrayList<String> result = new ArrayList<String>();
     for (File file : new File(root).listFiles()) {
       // skip dot-files
-      if (file.getName().indexOf('.') >= 0) continue;
+      if (file.getName().indexOf('.') >= 0)
+        continue;
       // skip open logs
-      if (file2id.containsKey(file.getName())) continue;
+      if (file2id.containsKey(file.getName()))
+        continue;
       try {
         UUID.fromString(file.getName());
         result.add(file.getName());

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/CoordinateRecoveryTask.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/CoordinateRecoveryTask.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/CoordinateRecoveryTask.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/CoordinateRecoveryTask.java Thu Oct 27 15:24:51 2011
@@ -66,7 +66,8 @@ public class CoordinateRecoveryTask impl
     
     LogFile(String metadataEntry) {
       String parts[] = metadataEntry.split("/");
-      if (parts.length != 2) throw new RuntimeException("Bad log file name: " + metadataEntry);
+      if (parts.length != 2)
+        throw new RuntimeException("Bad log file name: " + metadataEntry);
       server = parts[0];
       file = parts[1];
     }
@@ -155,7 +156,8 @@ public class CoordinateRecoveryTask impl
       
       if (elapsedMillis() > AccumuloConfiguration.getSystemConfiguration().getTimeInMillis(Property.MASTER_RECOVERY_MAXTIME)) {
         log.warn("Recovery taking too long, giving up");
-        if (sortJob != null) sortJob.killJob();
+        if (sortJob != null)
+          sortJob.killJob();
         return true;
       }
       
@@ -185,7 +187,8 @@ public class CoordinateRecoveryTask impl
       sortJob = null;
       String failed = logFile.failedFileName();
       try {
-        if (createFailFlag) fs.create(new Path(failed)).close();
+        if (createFailFlag)
+          fs.create(new Path(failed)).close();
       } catch (IOException e) {
         log.warn("Unable to create recovery fail marker" + failed);
       }
@@ -212,7 +215,8 @@ public class CoordinateRecoveryTask impl
       try {
         if (useMapReduce) {
           Path unsorted = new Path(logFile.unsortedFileName());
-          if (fs.exists(unsorted)) return fs.getFileStatus(unsorted).getLen();
+          if (fs.exists(unsorted))
+            return fs.getFileStatus(unsorted).getLen();
           return fs.getFileStatus(new Path(logFile.copyTempFileName())).getLen();
         } else {
           ContentSummary contentSummary = fs.getContentSummary(new Path(logFile.recoveryFileName()));
@@ -258,7 +262,8 @@ public class CoordinateRecoveryTask impl
           log.info("Error looking for recovery files", ex);
         }
       }
-      if (found) continue;
+      if (found)
+        continue;
       finished = false;
       // Start recovering all the logs we could need
       for (String metadataEntry : set) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/EventCoordinator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/EventCoordinator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/EventCoordinator.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/EventCoordinator.java Thu Oct 27 15:24:51 2011
@@ -23,7 +23,8 @@ public class EventCoordinator {
   private static final Logger log = Logger.getLogger(EventCoordinator.class);
   
   synchronized public void waitForSomethingInterestingToHappen(long millis) {
-    if (millis <= 0) return;
+    if (millis <= 0)
+      return;
     try {
       wait(millis);
     } catch (InterruptedException e) {

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java Thu Oct 27 15:24:51 2011
@@ -108,7 +108,8 @@ public class LiveTServerSet implements W
     }
     
     synchronized public void halt(ZooLock lock) throws TException, ThriftSecurityException {
-      if (client != null) client.halt(null, SecurityConstants.systemCredentials, lockString(lock));
+      if (client != null)
+        client.halt(null, SecurityConstants.systemCredentials, lockString(lock));
     }
     
     synchronized public void flush(ZooLock lock, String tableName) throws TException {
@@ -149,7 +150,8 @@ public class LiveTServerSet implements W
   }
   
   public synchronized ZooCache getZooCache() {
-    if (zooCache == null) zooCache = new ZooCache(this);
+    if (zooCache == null)
+      zooCache = new ZooCache(this);
     return zooCache;
   }
   
@@ -216,7 +218,8 @@ public class LiveTServerSet implements W
         }
       }
       // log.debug("Current: " + current.keySet());
-      if (doomed.size() + updates.size() > 0) this.cback.update(this, doomed, updates);
+      if (doomed.size() + updates.size() > 0)
+        this.cback.update(this, doomed, updates);
     } catch (Exception ex) {
       log.error(ex, ex);
     }
@@ -230,12 +233,15 @@ public class LiveTServerSet implements W
   public synchronized TServerConnection getConnection(TServerInstance server) throws TException {
     TServerConnection result;
     synchronized (this) {
-      if (server == null) return null;
+      if (server == null)
+        return null;
       TServerInfo serverInfo = current.get(server.hostPort());
       // lock was lost?
-      if (serverInfo == null) return null;
+      if (serverInfo == null)
+        return null;
       // instance changed?
-      if (!serverInfo.instance.equals(server)) return null;
+      if (!serverInfo.instance.equals(server))
+        return null;
       result = serverInfo.connection;
     }
     result.connectIfNeeded();

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LogSort.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LogSort.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LogSort.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/LogSort.java Thu Oct 27 15:24:51 2011
@@ -111,7 +111,8 @@ public class LogSort extends Configured 
    * The main driver for sort program. Invoke this method to submit the map/reduce job.
    */
   public int run(String[] args) throws IOException, InterruptedException, ClassNotFoundException {
-    if (job != null) throw new RuntimeException("job has already run");
+    if (job != null)
+      throw new RuntimeException("job has already run");
     
     // parse options
     int num_reduces = 1;
@@ -120,10 +121,14 @@ public class LogSort extends Configured 
     List<String> otherArgs = new ArrayList<String>();
     for (int i = 0; i < args.length; ++i) {
       try {
-        if ("-r".equals(args[i])) num_reduces = Integer.parseInt(args[++i]);
-        else if ("-q".equals(args[i])) queueName = args[++i];
-        else if ("-p".equals(args[i])) poolName = args[++i];
-        else otherArgs.add(args[i]);
+        if ("-r".equals(args[i]))
+          num_reduces = Integer.parseInt(args[++i]);
+        else if ("-q".equals(args[i]))
+          queueName = args[++i];
+        else if ("-p".equals(args[i]))
+          poolName = args[++i];
+        else
+          otherArgs.add(args[i]);
       } catch (NumberFormatException e) {
         log.error("Integer expected instead of " + args[i], e);
         printUsage();
@@ -178,8 +183,10 @@ public class LogSort extends Configured 
   public static Job startSort(boolean background, String[] args) throws Exception {
     LogSort sort = new LogSort();
     ToolRunner.run(CachedConfiguration.getInstance(), sort, args);
-    if (background) sort.job.submit();
-    else sort.job.waitForCompletion(true);
+    if (background)
+      sort.job.submit();
+    else
+      sort.job.waitForCompletion(true);
     return sort.job;
   }
   
@@ -188,7 +195,8 @@ public class LogSort extends Configured 
     log.info("Job started");
     Job job = startSort(false, args);
     log.info("The job finished after " + ((System.currentTimeMillis() - startTime) / 1000) + " seconds.");
-    if (!job.isSuccessful()) System.exit(1);
+    if (!job.isSuccessful())
+      System.exit(1);
   }
   
   private static class LoggerMapFileOutputFormat extends FileOutputFormat<WritableComparable<?>,Writable> {



Mime
View raw message