accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [45/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/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/sequential/BatchVerify.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/BulkInsert.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/BulkInsert.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/BulkInsert.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/BulkInsert.java Thu Oct 27 15:24:51 2011
@@ -148,11 +148,14 @@ public class BulkInsert extends Test {
         log.warn("Failed to bulk import some files, retrying ");
         
         for (FileStatus failure : failures) {
-          if (!failure.getPath().getName().endsWith(".seq")) fs.rename(failure.getPath(), new Path(new Path(bulkDir), failure.getPath().getName()));
-          else log.debug("Ignoring " + failure.getPath());
+          if (!failure.getPath().getName().endsWith(".seq"))
+            fs.rename(failure.getPath(), new Path(new Path(bulkDir), failure.getPath().getName()));
+          else
+            log.debug("Ignoring " + failure.getPath());
         }
         UtilWaitThread.sleep(3000);
-      } else break;
+      } else
+        break;
     }
   }
   

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Delete.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/DeleteSomeDocs.java Thu Oct 27 15:24:51 2011
@@ -44,7 +44,8 @@ public class DeleteSomeDocs extends Test
     ArrayList<String> patterns = new ArrayList<String>();
     
     for (Object key : props.keySet())
-      if (key instanceof String && ((String) key).startsWith("pattern")) patterns.add(props.getProperty((String) key));
+      if (key instanceof String && ((String) key).startsWith("pattern"))
+        patterns.add(props.getProperty((String) key));
     
     String pattern = patterns.get(rand.nextInt(patterns.size()));
     

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Flush.java (original)
+++ incubator/accumulo/trunk/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, null, null, true);
     log.debug("Flushed " + table);

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Insert.java Thu Oct 27 15:24:51 2011
@@ -81,7 +81,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);
     }
@@ -120,12 +121,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/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/Search.java Thu Oct 27 15:24:51 2011
@@ -45,14 +45,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)
@@ -84,7 +86,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 {
@@ -93,7 +96,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/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/randomwalk/shard/VerifyIndex.java Thu Oct 27 15:24:51 2011
@@ -45,17 +45,19 @@ public class VerifyIndex extends Test {
     int 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/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFSDataInputStream.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFSDataInputStream.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFSDataInputStream.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFSDataInputStream.java Thu Oct 27 15:24:51 2011
@@ -37,7 +37,8 @@ public class TraceFSDataInputStream exte
   @Override
   public int read(long position, byte[] buffer, int offset, int length) throws IOException {
     Span span = Trace.start("FSDataInputStream.read");
-    if (Trace.isTracing()) span.data("length", Integer.toString(length));
+    if (Trace.isTracing())
+      span.data("length", Integer.toString(length));
     try {
       return impl.read(position, buffer, offset, length);
     } finally {
@@ -48,7 +49,8 @@ public class TraceFSDataInputStream exte
   @Override
   public void readFully(long position, byte[] buffer, int offset, int length) throws IOException {
     Span span = Trace.start("FSDataInputStream.readFully");
-    if (Trace.isTracing()) span.data("length", Integer.toString(length));
+    if (Trace.isTracing())
+      span.data("length", Integer.toString(length));
     try {
       impl.readFully(position, buffer, offset, length);
     } finally {
@@ -59,7 +61,8 @@ public class TraceFSDataInputStream exte
   @Override
   public void readFully(long position, byte[] buffer) throws IOException {
     Span span = Trace.start("FSDataInputStream.readFully");
-    if (Trace.isTracing()) span.data("length", Integer.toString(buffer.length));
+    if (Trace.isTracing())
+      span.data("length", Integer.toString(buffer.length));
     try {
       impl.readFully(position, buffer);
     } finally {

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java Thu Oct 27 15:24:51 2011
@@ -43,8 +43,10 @@ public class TraceFileSystem extends Fil
   public void setConf(Configuration conf) {
     Span span = Trace.start("setConf");
     try {
-      if (impl != null) impl.setConf(conf);
-      else super.setConf(conf);
+      if (impl != null)
+        impl.setConf(conf);
+      else
+        super.setConf(conf);
     } finally {
       span.stop();
     }
@@ -72,7 +74,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataInputStream open(Path f) throws IOException {
     Span span = Trace.start("open");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return new TraceFSDataInputStream(impl.open(f));
     } finally {
@@ -83,7 +86,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f);
     } finally {
@@ -94,7 +98,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, overwrite);
     } finally {
@@ -105,7 +110,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, Progressable progress) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       
       return impl.create(f, progress);
@@ -117,7 +123,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, short replication) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, replication);
     } finally {
@@ -128,7 +135,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, short replication, Progressable progress) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, replication, progress);
     } finally {
@@ -139,7 +147,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, overwrite, bufferSize);
     } finally {
@@ -150,7 +159,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, Progressable progress) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, overwrite, bufferSize, progress);
     } finally {
@@ -161,7 +171,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, overwrite, bufferSize, replication, blockSize);
     } finally {
@@ -172,7 +183,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException {
     Span span = Trace.start("create");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.create(f, overwrite, bufferSize, replication, blockSize, progress);
     } finally {
@@ -183,7 +195,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean createNewFile(Path f) throws IOException {
     Span span = Trace.start("createNewFile");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.createNewFile(f);
     } finally {
@@ -194,7 +207,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream append(Path f) throws IOException {
     Span span = Trace.start("append");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.append(f);
     } finally {
@@ -205,7 +219,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FSDataOutputStream append(Path f, int bufferSize) throws IOException {
     Span span = Trace.start("append");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.append(f, bufferSize);
     } finally {
@@ -217,7 +232,8 @@ public class TraceFileSystem extends Fil
   @Override
   public short getReplication(Path src) throws IOException {
     Span span = Trace.start("getReplication");
-    if (Trace.isTracing()) span.data("path", src.toString());
+    if (Trace.isTracing())
+      span.data("path", src.toString());
     try {
       return impl.getReplication(src);
     } finally {
@@ -228,7 +244,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean setReplication(Path src, short replication) throws IOException {
     Span span = Trace.start("setReplication");
-    if (Trace.isTracing()) span.data("path", src.toString());
+    if (Trace.isTracing())
+      span.data("path", src.toString());
     try {
       return impl.setReplication(src, replication);
     } finally {
@@ -239,7 +256,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean exists(Path f) throws IOException {
     Span span = Trace.start("exists");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.exists(f);
     } finally {
@@ -251,7 +269,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean isDirectory(Path f) throws IOException {
     Span span = Trace.start("isDirectory");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.isDirectory(f);
     } finally {
@@ -262,7 +281,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean isFile(Path f) throws IOException {
     Span span = Trace.start("isFile");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.isFile(f);
     } finally {
@@ -274,7 +294,8 @@ public class TraceFileSystem extends Fil
   @Override
   public long getLength(Path f) throws IOException {
     Span span = Trace.start("getLength");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.getLength(f);
     } finally {
@@ -285,7 +306,8 @@ public class TraceFileSystem extends Fil
   @Override
   public ContentSummary getContentSummary(Path f) throws IOException {
     Span span = Trace.start("getContentSummary");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.getContentSummary(f);
     } finally {
@@ -296,7 +318,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FileStatus[] listStatus(Path f, PathFilter filter) throws IOException {
     Span span = Trace.start("listStatus");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.listStatus(f, filter);
     } finally {
@@ -327,7 +350,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FileStatus[] globStatus(Path pathPattern) throws IOException {
     Span span = Trace.start("globStatus");
-    if (Trace.isTracing()) span.data("pattern", pathPattern.toString());
+    if (Trace.isTracing())
+      span.data("pattern", pathPattern.toString());
     try {
       return impl.globStatus(pathPattern);
     } finally {
@@ -338,7 +362,8 @@ public class TraceFileSystem extends Fil
   @Override
   public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException {
     Span span = Trace.start("globStatus");
-    if (Trace.isTracing()) span.data("pattern", pathPattern.toString());
+    if (Trace.isTracing())
+      span.data("pattern", pathPattern.toString());
     try {
       return impl.globStatus(pathPattern, filter);
     } finally {
@@ -359,7 +384,8 @@ public class TraceFileSystem extends Fil
   @Override
   public boolean mkdirs(Path f) throws IOException {
     Span span = Trace.start("mkdirs");
-    if (Trace.isTracing()) span.data("path", f.toString());
+    if (Trace.isTracing())
+      span.data("path", f.toString());
     try {
       return impl.mkdirs(f);
     } finally {

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeAccumuloSite.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/UpgradeMetadataTable.java Thu Oct 27 15:24:51 2011
@@ -83,9 +83,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);
@@ -137,10 +139,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);
@@ -305,8 +309,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/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/upgrade/ZooKeeperUpgrade.java Thu Oct 27 15:24:51 2011
@@ -80,9 +80,10 @@ public class ZooKeeperUpgrade extends In
         zoo.putPersistentData(ZKUserPath + "/" + user + "/Tables", new byte[] {}, NodeExistsPolicy.FAIL);
         List<String> tables = zoo.getChildren(ZKUserPath + "/" + user + "/Tables.old");
         for (String table : tables) {
-          if (tableIds.containsKey(table)) move(zoo, 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(zoo, 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);
         }
         zoo.recursiveDelete(ZKUserPath + "/" + user + "/Tables.old", NodeMissingPolicy.SKIP);
       }
@@ -128,16 +129,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, NodeExistsPolicy.FAIL);
       String oldConfDir = zkInstanceRoot + OLD_TABLE_CONF_DIR + "/" + tableName;
-      if (zoo.exists(oldConfDir)) if (tableId.equals(Constants.METADATA_TABLE_ID)) zoo.recursiveDelete(oldConfDir, NodeMissingPolicy.SKIP);
-      else zoo.recursiveCopyPersistent(oldConfDir, zkInstanceRoot + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF, NodeExistsPolicy.OVERWRITE);
+      if (zoo.exists(oldConfDir))
+        if (tableId.equals(Constants.METADATA_TABLE_ID))
+          zoo.recursiveDelete(oldConfDir, NodeMissingPolicy.SKIP);
+        else
+          zoo.recursiveCopyPersistent(oldConfDir, zkInstanceRoot + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF, NodeExistsPolicy.OVERWRITE);
       
-      if (!tableId.equals(Constants.METADATA_TABLE_ID)) validateConfig(tableId, zoo);
-      else initMetadataConfig();
+      if (!tableId.equals(Constants.METADATA_TABLE_ID))
+        validateConfig(tableId, zoo);
+      else
+        initMetadataConfig();
     }
     
     // clean up old table configuration directories
@@ -153,7 +161,8 @@ public class ZooKeeperUpgrade extends In
       tableName = tableName.substring(tableName.lastIndexOf('/') + 1);
       tableNames.add(tableName);
     }
-    if (zoo.exists(zkInstanceRoot + OLD_TABLE_CONF_DIR)) tableNames.addAll(zoo.getChildren(zkInstanceRoot + OLD_TABLE_CONF_DIR));
+    if (zoo.exists(zkInstanceRoot + OLD_TABLE_CONF_DIR))
+      tableNames.addAll(zoo.getChildren(zkInstanceRoot + OLD_TABLE_CONF_DIR));
     return tableNames;
   }
   

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Admin.java Thu Oct 27 15:24:51 2011
@@ -58,7 +58,8 @@ 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";
@@ -66,17 +67,21 @@ public class Admin {
       force = cl.hasOption("f");
       
       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);

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java Thu Oct 27 15:24:51 2011
@@ -51,7 +51,8 @@ public class ChangeSecret {
     
     FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
     Instance inst = HdfsZooInstance.getInstance();
-    if (!verifyAccumuloIsDown(inst, oldPass)) System.exit(-1);
+    if (!verifyAccumuloIsDown(inst, oldPass))
+      System.exit(-1);
     String instanceId = rewriteZooKeeperInstance(inst, oldPass, newPass);
     updateHdfs(fs, inst, instanceId);
     if (oldPass != null) {
@@ -83,7 +84,8 @@ public class ChangeSecret {
     recurse(zooReader, root, new Visitor() {
       public void visit(ZooReader zoo, String path) throws Exception {
         Stat stat = zoo.getStatus(path);
-        if (stat.getEphemeralOwner() != 0) ephemerals.add(path);
+        if (stat.getEphemeralOwner() != 0)
+          ephemerals.add(path);
       }
     });
     if (ephemerals.size() == 0) {

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java Thu Oct 27 15:24:51 2011
@@ -96,8 +96,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 {
@@ -224,7 +226,8 @@ public class CheckForMetadataProblems {
       System.exit(-1);
     }
     
-    if (sawProblems) System.exit(-1);
+    if (sawProblems)
+      System.exit(-1);
   }
   
 }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java Thu Oct 27 15:24:51 2011
@@ -32,8 +32,7 @@ public class CleanZookeeper {
   
   /**
    * @param args
-   *          must contain one element: the address of a zookeeper node
-   *          a second parameter provides an additional authentication value
+   *          must contain one element: the address of a zookeeper node a second parameter provides an additional authentication value
    * @throws IOException
    *           error connecting to accumulo or zookeeper
    */

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/CountRowKeys.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java Thu Oct 27 15:24:51 2011
@@ -51,7 +51,8 @@ public class DeleteZooInstance {
         for (String instance : instances) {
           String path = Constants.ZROOT + Constants.ZINSTANCES + "/" + instance;
           byte[] data = zk.getData(path, null);
-          if (name.equals(new String(data))) zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
+          if (name.equals(new String(data)))
+            zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
         }
         zk.recursiveDelete(Constants.ZROOT + "/" + name, NodeMissingPolicy.SKIP);
       }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpTable.java Thu Oct 27 15:24:51 2011
@@ -85,8 +85,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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java Thu Oct 27 15:24:51 2011
@@ -52,13 +52,15 @@ public class DumpZookeeper {
     // int timeout = 30 * 1000;
     // String server = args[0];
     String root = "/";
-    if (args.length > 0) root = args[0];
+    if (args.length > 0)
+      root = args[0];
     try {
       zk = ZooReaderWriter.getInstance();
       
       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);
@@ -67,9 +69,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.getStatus(path);
-    if (stat == null) return;
+    if (stat == null)
+      return;
     String type = "node";
     if (stat.getEphemeralOwner() != 0) {
       type = "ephemeral";
@@ -99,7 +103,8 @@ public class DumpZookeeper {
     byte[] data = zk.getData(path, 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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/FileSystemMonitor.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Halt.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/Initialize.java Thu Oct 27 15:24:51 2011
@@ -73,7 +73,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;
   }
   
@@ -104,9 +105,10 @@ public class Initialize {
   }
   
   public static boolean doInit(Configuration conf, FileSystem fs) throws IOException {
-    if (!ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_URI).equals("")) log.info("Hadoop Filesystem is "
-        + ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_URI));
-    else log.info("Hadoop Filesystem is " + FileSystem.getDefaultUri(conf));
+    if (!ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_URI).equals(""))
+      log.info("Hadoop Filesystem is " + ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_DFS_URI));
+    else
+      log.info("Hadoop Filesystem is " + FileSystem.getDefaultUri(conf));
     
     log.info("Accumulo data dir is " + ServerConstants.getBaseDir());
     log.info("Zookeeper server is " + ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST));
@@ -311,7 +313,8 @@ public class Initialize {
     ZooUtil.putPersistentData(zoo.getZooKeeper(), Constants.ZROOT + Constants.ZINSTANCES, new byte[0], -1, NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
     
     // setup instance name
-    if (clearInstanceName) zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
+    if (clearInstanceName)
+      zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
     zoo.putPersistentData(instanceNamePath, uuid.getBytes(), NodeExistsPolicy.FAIL);
     
     // setup the instance
@@ -342,16 +345,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 = ZooReaderWriter.getInstance().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;
@@ -366,10 +372,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();
   }
@@ -381,8 +390,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);
@@ -412,9 +421,12 @@ public class Initialize {
       Configuration conf = CachedConfiguration.getInstance();
       FileSystem fs = FileUtil.getFileSystem(conf, ServerConfiguration.getSiteConfiguration());
       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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java Thu Oct 27 15:24:51 2011
@@ -204,7 +204,8 @@ public class ListInstances {
       List<String> children = zk.getChildren(Constants.ZROOT);
       
       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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MapFilePerformanceTest.java Thu Oct 27 15:24:51 2011
@@ -104,7 +104,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();
@@ -163,7 +164,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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java Thu Oct 27 15:24:51 2011
@@ -122,7 +122,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);
@@ -180,7 +181,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;
     }
@@ -191,7 +193,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);
@@ -205,7 +208,8 @@ public class MetadataTable extends org.a
     for (String scanFile : filesInUseByScans)
       m.put(Constants.METADATA_SCANFILE_COLUMN_FAMILY, new Text(scanFile), new Value("".getBytes()));
     
-    if (mergeFile != null) m.putDelete(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(mergeFile));
+    if (mergeFile != null)
+      m.putDelete(Constants.METADATA_DATAFILE_COLUMN_FAMILY, new Text(mergeFile));
     
     ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value((flushId + "").getBytes()));
     
@@ -301,9 +305,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);
@@ -402,7 +408,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);
     }
@@ -416,8 +423,10 @@ public class MetadataTable extends org.a
     
     ColumnFQ.put(m, Constants.METADATA_DIRECTORY_COLUMN, new Value(path.getBytes()));
     ColumnFQ.put(m, Constants.METADATA_TIME_COLUMN, new Value(time.getBytes()));
-    if (lastFlushID > 0) ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value(("" + lastFlushID).getBytes()));
-    if (lastCompactID > 0) ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + lastCompactID).getBytes()));
+    if (lastFlushID > 0)
+      ColumnFQ.put(m, Constants.METADATA_FLUSH_COLUMN, new Value(("" + lastFlushID).getBytes()));
+    if (lastCompactID > 0)
+      ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + lastCompactID).getBytes()));
     
     if (location != null) {
       m.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, location.asColumnQualifier(), location.asMutationValue());
@@ -486,12 +495,15 @@ 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()));
     
-    if (compactionId != null) ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + compactionId).getBytes()));
+    if (compactionId != null)
+      ColumnFQ.put(m, Constants.METADATA_COMPACT_COLUMN, new Value(("" + compactionId).getBytes()));
     
     // remove the old location
-    if (lastLocation != null) lastLocation.clearLastLocation(m);
+    if (lastLocation != null)
+      lastLocation.clearLastLocation(m);
     TServerInstance self = getTServerInstance(address, zooLock);
     self.putLastLocation(m);
     
@@ -514,8 +526,10 @@ public class MetadataTable extends org.a
   public static Mutation createDeleteMutation(String tableId, String pathToRemove) {
     Mutation delFlag;
     ;
-    if (pathToRemove.startsWith("../")) delFlag = new Mutation(new Text(Constants.METADATA_DELETE_FLAG_PREFIX + pathToRemove.substring(2)));
-    else delFlag = new Mutation(new Text(Constants.METADATA_DELETE_FLAG_PREFIX + "/" + tableId + pathToRemove));
+    if (pathToRemove.startsWith("../"))
+      delFlag = new Mutation(new Text(Constants.METADATA_DELETE_FLAG_PREFIX + pathToRemove.substring(2)));
+    else
+      delFlag = new Mutation(new Text(Constants.METADATA_DELETE_FLAG_PREFIX + "/" + tableId + pathToRemove));
     
     delFlag.put(EMPTY_TEXT, EMPTY_TEXT, new Value(new byte[] {}));
     return delFlag;
@@ -541,9 +555,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, long initFlushID, long initCompactID, 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;
     
@@ -663,11 +677,13 @@ public class MetadataTable extends org.a
     
     Value flushID = columns.get(Constants.METADATA_FLUSH_COLUMN);
     long initFlushID = -1;
-    if (flushID != null) initFlushID = Long.parseLong(flushID.toString());
+    if (flushID != null)
+      initFlushID = Long.parseLong(flushID.toString());
     
     Value compactID = columns.get(Constants.METADATA_COMPACT_COLUMN);
     long initCompactID = -1;
-    if (compactID != null) initCompactID = Long.parseLong(compactID.toString());
+    if (compactID != null)
+      initCompactID = Long.parseLong(compactID.toString());
     
     Text metadataPrevEndRow = KeyExtent.decodePrevEndRow(prevEndRowIBW);
     
@@ -697,7 +713,8 @@ public class MetadataTable extends org.a
         if (key.getColumnFamily().equals(Constants.METADATA_DATAFILE_COLUMN_FAMILY)) {
           String relPath = key.getColumnQualifier().toString();
           // only insert deletes for files owned by this table
-          if (!relPath.startsWith("../")) bw.addMutation(createDeleteMutation(tableId, relPath));
+          if (!relPath.startsWith("../"))
+            bw.addMutation(createDeleteMutation(tableId, relPath));
         }
         
         if (Constants.METADATA_DIRECTORY_COLUMN.hasColumns(key)) {
@@ -715,18 +732,21 @@ public class MetadataTable extends org.a
       
       if (m == null) {
         m = new Mutation(key.getRow());
-        if (lock != null) putLockID(lock, m);
+        if (lock != null)
+          putLockID(lock, m);
       }
       
       if (key.getRow().compareTo(m.getRow(), 0, m.getRow().length) != 0) {
         bw.addMutation(m);
         m = new Mutation(key.getRow());
-        if (lock != null) putLockID(lock, m);
+        if (lock != null)
+          putLockID(lock, m);
       }
       m.putDelete(key.getColumnFamily(), key.getColumnQualifier());
     }
     
-    if (m != null) bw.addMutation(m);
+    if (m != null)
+      bw.addMutation(m);
     
     bw.close();
   }
@@ -784,7 +804,8 @@ 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)) {
@@ -792,7 +813,8 @@ public class MetadataTable extends org.a
       while (true) {
         try {
           IZooReaderWriter zoo = ZooReaderWriter.getInstance();
-          if (zoo.isLockHeld(zooLock.getLockID())) zoo.putPersistentData(root + "/" + entry.filename, entry.toBytes(), NodeExistsPolicy.OVERWRITE);
+          if (zoo.isLockHeld(zooLock.getLockID()))
+            zoo.putPersistentData(root + "/" + entry.filename, entry.toBytes(), NodeExistsPolicy.OVERWRITE);
           break;
         } catch (KeeperException e) {
           log.error(e, e);
@@ -891,8 +913,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;
       }
     });
@@ -968,7 +992,8 @@ public class MetadataTable extends org.a
         while (true) {
           try {
             IZooReaderWriter zoo = ZooReaderWriter.getInstance();
-            if (zoo.isLockHeld(zooLock.getLockID())) zoo.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
+            if (zoo.isLockHeld(zooLock.getLockID()))
+              zoo.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
             break;
           } catch (Exception e) {
             log.error(e, e);
@@ -987,7 +1012,8 @@ public class MetadataTable extends org.a
     for (Entry<Key,Value> entry : tablet.entrySet()) {
       if (entry.getKey().getColumnFamily().equals(Constants.METADATA_DATAFILE_COLUMN_FAMILY)) {
         String cf = entry.getKey().getColumnQualifier().toString();
-        if (srcTableId != null && !cf.startsWith("../")) cf = "../" + srcTableId + entry.getKey().getColumnQualifier();
+        if (srcTableId != null && !cf.startsWith("../"))
+          cf = "../" + srcTableId + entry.getKey().getColumnQualifier();
         files.add(cf);
       }
     }
@@ -1001,7 +1027,8 @@ public class MetadataTable extends org.a
     for (Entry<Key,Value> entry : tablet.entrySet()) {
       if (entry.getKey().getColumnFamily().equals(Constants.METADATA_DATAFILE_COLUMN_FAMILY)) {
         String cf = entry.getKey().getColumnQualifier().toString();
-        if (!cf.startsWith("../")) cf = "../" + srcTableId + entry.getKey().getColumnQualifier();
+        if (!cf.startsWith("../"))
+          cf = "../" + srcTableId + entry.getKey().getColumnQualifier();
         m.put(entry.getKey().getColumnFamily(), new Text(cf), entry.getValue());
       } else if (entry.getKey().getColumnFamily().equals(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY)) {
         m.put(Constants.METADATA_LAST_LOCATION_COLUMN_FAMILY, entry.getKey().getColumnQualifier(), entry.getValue());
@@ -1029,7 +1056,8 @@ public class MetadataTable extends org.a
   static void initializeClone(String srcTableId, String tableId, Connector conn, BatchWriter bw) throws TableNotFoundException, MutationsRejectedException {
     TabletIterator ti = new TabletIterator(createCloneScanner(srcTableId, conn), new KeyExtent(new Text(srcTableId), null, null).toMetadataRange(), true, true);
     
-    if (!ti.hasNext()) throw new RuntimeException(" table deleted during clone?  srcTableId = " + srcTableId);
+    if (!ti.hasNext())
+      throw new RuntimeException(" table deleted during clone?  srcTableId = " + srcTableId);
     
     while (ti.hasNext())
       bw.addMutation(createCloneMutation(srcTableId, tableId, ti.next()));
@@ -1046,8 +1074,8 @@ public class MetadataTable extends org.a
         true);
     TabletIterator cloneIter = new TabletIterator(createCloneScanner(tableId, conn), new KeyExtent(new Text(tableId), null, null).toMetadataRange(), true, true);
     
-    if (!cloneIter.hasNext() || !srcIter.hasNext()) throw new RuntimeException(" table deleted during clone?  srcTableId = " + srcTableId + " tableId="
-        + tableId);
+    if (!cloneIter.hasNext() || !srcIter.hasNext())
+      throw new RuntimeException(" table deleted during clone?  srcTableId = " + srcTableId + " tableId=" + tableId);
     
     int rewrites = 0;
     
@@ -1064,7 +1092,8 @@ public class MetadataTable extends org.a
         }
       }
       
-      if (!cloneSuccessful) getFiles(cloneFiles, cloneTablet, null);
+      if (!cloneSuccessful)
+        getFiles(cloneFiles, cloneTablet, null);
       
       List<Map<Key,Value>> srcTablets = new ArrayList<Map<Key,Value>>();
       Map<Key,Value> srcTablet = srcIter.next();
@@ -1073,22 +1102,27 @@ public class MetadataTable extends org.a
       Text srcEndRow = new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null).getEndRow();
       
       int cmp = compareEndRows(cloneEndRow, srcEndRow);
-      if (cmp < 0) throw new TabletIterator.TabletDeletedException("Tablets deleted from src during clone : " + cloneEndRow + " " + srcEndRow);
+      if (cmp < 0)
+        throw new TabletIterator.TabletDeletedException("Tablets deleted from src during clone : " + cloneEndRow + " " + srcEndRow);
       
       HashSet<String> srcFiles = new HashSet<String>();
-      if (!cloneSuccessful) getFiles(srcFiles, srcTablet, srcTableId);
+      if (!cloneSuccessful)
+        getFiles(srcFiles, srcTablet, srcTableId);
       
       while (cmp > 0) {
         srcTablet = srcIter.next();
         srcTablets.add(srcTablet);
         srcEndRow = new KeyExtent(srcTablet.keySet().iterator().next().getRow(), (Text) null).getEndRow();
         cmp = compareEndRows(cloneEndRow, srcEndRow);
-        if (cmp < 0) throw new TabletIterator.TabletDeletedException("Tablets deleted from src during clone : " + cloneEndRow + " " + srcEndRow);
+        if (cmp < 0)
+          throw new TabletIterator.TabletDeletedException("Tablets deleted from src during clone : " + cloneEndRow + " " + srcEndRow);
         
-        if (!cloneSuccessful) getFiles(srcFiles, srcTablet, srcTableId);
+        if (!cloneSuccessful)
+          getFiles(srcFiles, srcTablet, srcTableId);
       }
       
-      if (cloneSuccessful) continue;
+      if (cloneSuccessful)
+        continue;
       
       if (!srcFiles.containsAll(cloneFiles)) {
         // delete existing cloned tablet entry
@@ -1132,7 +1166,8 @@ public class MetadataTable extends org.a
         while (true) {
           int rewrites = checkClone(srcTableId, tableId, conn, bw);
           
-          if (rewrites == 0) break;
+          if (rewrites == 0)
+            break;
         }
         
         bw.flush();

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java (original)
+++ incubator/accumulo/trunk/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);
@@ -73,12 +75,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) {
@@ -102,7 +106,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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java (original)
+++ incubator/accumulo/trunk/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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java Thu Oct 27 15:24:51 2011
@@ -28,7 +28,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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java Thu Oct 27 15:24:51 2011
@@ -89,23 +89,28 @@ public class TServerUtils {
       Property minThreadProperty, Property timeBetweenThreadChecksProperty) throws UnknownHostException {
     int portHint = ServerConfiguration.getSystemConfiguration().getPort(portHintProperty);
     int minThreads = 2;
-    if (minThreadProperty != null) minThreads = ServerConfiguration.getSystemConfiguration().getCount(minThreadProperty);
+    if (minThreadProperty != null)
+      minThreads = ServerConfiguration.getSystemConfiguration().getCount(minThreadProperty);
     long timeBetweenThreadChecks = 1000;
-    if (timeBetweenThreadChecksProperty != null) timeBetweenThreadChecks = ServerConfiguration.getSystemConfiguration().getTimeInMillis(
-        timeBetweenThreadChecksProperty);
+    if (timeBetweenThreadChecksProperty != null)
+      timeBetweenThreadChecks = ServerConfiguration.getSystemConfiguration().getTimeInMillis(timeBetweenThreadChecksProperty);
     boolean portSearch = false;
-    if (portSearchProperty != null) portSearch = ServerConfiguration.getSystemConfiguration().getBoolean(portSearchProperty);
+    if (portSearchProperty != null)
+      portSearch = ServerConfiguration.getSystemConfiguration().getBoolean(portSearchProperty);
     Random random = new Random();
     for (int j = 0; j < 100; j++) {
       
       // 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 (portHint == 0) port = 1024 + random.nextInt(65535 - 1024);
-        if (port > 65535) port = 1024 + port % (65535 - 1024);
+        if (portHint == 0)
+          port = 1024 + random.nextInt(65535 - 1024);
+        if (port > 65535)
+          port = 1024 + port % (65535 - 1024);
         try {
           return TServerUtils.startTServer(port, processor, serverName, threadName, minThreads, timeBetweenThreadChecks);
         } catch (Exception ex) {
@@ -293,7 +298,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/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java (original)
+++ incubator/accumulo/trunk/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 {
-    if (!isPropertyValid(property, value)) return false;
+    if (!isPropertyValid(property, value))
+      return false;
     
     // create the zk node for per-table properties for this table if it doesn't already exist
     String zkTablePath = getTablePath(tableId);
@@ -42,7 +43,8 @@ public class TablePropUtil {
   
   public static boolean isPropertyValid(String property, String value) {
     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;
     
     return true;
   }

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/util/TabletIterator.java Thu Oct 27 15:24:51 2011
@@ -166,7 +166,8 @@ public class TabletIterator implements I
   @Override
   public Map<Key,Value> next() {
     
-    if (!hasNext()) throw new NoSuchElementException();
+    if (!hasNext())
+      throw new NoSuchElementException();
     
     Map<Key,Value> tmp = currentTabletKeys;
     currentTabletKeys = null;
@@ -252,7 +253,8 @@ public class TabletIterator implements I
         count++;
       }
       
-      if (count == 0) throw new TabletDeletedException("Tablet " + lastTablet + " was deleted while iterating");
+      if (count == 0)
+        throw new TabletDeletedException("Tablet " + lastTablet + " was deleted while iterating");
       
       // start right after the last good tablet
       range = new Range(new Key(lastTablet).followingKey(PartialKey.ROW), true, this.range.getEndKey(), this.range.isEndKeyInclusive());



Mime
View raw message